Reads and writes Nintendo 3DS SMDH files
- TitleObject :
Object
- TitleBuffer :
Buffer
A Buffer object that is exactly 0x200 bytes long
- TitleObjects :
Object.<TitleObject>
- BitmapObject :
Object
Kind: global class
- SMDH
- new SMDH([buffer])
- .writeTitleBuffer(buffer, index) ⇒
SMDH
- .getTitle(index) ⇒
TitleObject
- .getJapaneseTitle() ⇒
TitleObject
- .getEnglishTitle() ⇒
TitleObject
- .getFrenchTitle() ⇒
TitleObject
- .getGermanTitle() ⇒
TitleObject
- .getItalianTitle() ⇒
TitleObject
- .getSpanishTitle() ⇒
TitleObject
- .getSimplifiedChineseTitle() ⇒
TitleObject
- .getKoreanTitle() ⇒
TitleObject
- .getDutchTitle() ⇒
TitleObject
- .getPortugueseTitle() ⇒
TitleObject
- .getRussianTitle() ⇒
TitleObject
- .getTraditionalChineseTitle() ⇒
TitleObject
- .getAllTitles() ⇒
TitleObjects
- .setTitle(index, shortDescription, longDescription, publisher) ⇒
SMDH
- .setJapaneseTitle(shortDescription, longDescription, publisher) ⇒
SMDH
- .setEnglishTitle(shortDescription, longDescription, publisher) ⇒
SMDH
- .setFrenchTitle(shortDescription, longDescription, publisher) ⇒
SMDH
- .setGermanTitle(shortDescription, longDescription, publisher) ⇒
SMDH
- .setItalianTitle(shortDescription, longDescription, publisher) ⇒
SMDH
- .setSpanishTitle(shortDescription, longDescription, publisher) ⇒
SMDH
- .setSimplifiedChineseTitle(shortDescription, longDescription, publisher) ⇒
SMDH
- .setKoreanTitle(shortDescription, longDescription, publisher) ⇒
SMDH
- .setDutchTitle(shortDescription, longDescription, publisher) ⇒
SMDH
- .setPortugueseTitle(shortDescription, longDescription, publisher) ⇒
SMDH
- .setRussianTitle(shortDescription, longDescription, publisher) ⇒
SMDH
- .setTraditionalChineseTitle(shortDescription, longDescription, publisher) ⇒
SMDH
- .setAllTitles(shortDescription, longDescription, publisher) ⇒
SMDH
- .getSmallIcon([callback]) ⇒
Promise.<PNG>
- .getLargeIcon([callback]) ⇒
Promise.<PNG>
- .setIcon(bitmap, iconSize, [callback]) ⇒
Promise.<Buffer>
- .setIcons(bitmap, [callback]) ⇒
Promise.<buffer>
- .getBuffer() ⇒
Buffer
A class for reading and writing 3DS SMDH data.
Param | Type | Description |
---|---|---|
[buffer] | Buffer |
An 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
Param | Type | Description |
---|---|---|
buffer | TitleBuffer |
The buffer to write |
index | Integer |
The index to write to |
smdH.getTitle(index) ⇒ TitleObject
Gets the title object from the SMDH at the specified index
Kind: instance method of SMDH
Param | Type | Description |
---|---|---|
index | Integer |
The 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
Param | Type | Description |
---|---|---|
index | Integer |
The title index to write to |
shortDescription | String |
The short description, max of 64 characters |
longDescription | String |
The long description, max of 128 characters |
publisher | String |
The 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
Param | Type | Description |
---|---|---|
shortDescription | String |
The short description, max of 64 characters |
longDescription | String |
The long description, max of 128 characters |
publisher | String |
The 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
Param | Type | Description |
---|---|---|
shortDescription | String |
The short description, max of 64 characters |
longDescription | String |
The long description, max of 128 characters |
publisher | String |
The 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
Param | Type | Description |
---|---|---|
shortDescription | String |
The short description, max of 64 characters |
longDescription | String |
The long description, max of 128 characters |
publisher | String |
The 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
Param | Type | Description |
---|---|---|
shortDescription | String |
The short description, max of 64 characters |
longDescription | String |
The long description, max of 128 characters |
publisher | String |
The 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
Param | Type | Description |
---|---|---|
shortDescription | String |
The short description, max of 64 characters |
longDescription | String |
The long description, max of 128 characters |
publisher | String |
The 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
Param | Type | Description |
---|---|---|
shortDescription | String |
The short description, max of 64 characters |
longDescription | String |
The long description, max of 128 characters |
publisher | String |
The 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
Param | Type | Description |
---|---|---|
shortDescription | String |
The short description, max of 64 characters |
longDescription | String |
The long description, max of 128 characters |
publisher | String |
The 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
Param | Type | Description |
---|---|---|
shortDescription | String |
The short description, max of 64 characters |
longDescription | String |
The long description, max of 128 characters |
publisher | String |
The 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
Param | Type | Description |
---|---|---|
shortDescription | String |
The short description, max of 64 characters |
longDescription | String |
The long description, max of 128 characters |
publisher | String |
The 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
Param | Type | Description |
---|---|---|
shortDescription | String |
The short description, max of 64 characters |
longDescription | String |
The long description, max of 128 characters |
publisher | String |
The 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
Param | Type | Description |
---|---|---|
shortDescription | String |
The short description, max of 64 characters |
longDescription | String |
The long description, max of 128 characters |
publisher | String |
The 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
Param | Type | Description |
---|---|---|
shortDescription | String |
The short description, max of 64 characters |
longDescription | String |
The long description, max of 128 characters |
publisher | String |
The 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
Param | Type | Description |
---|---|---|
shortDescription | String |
The short description, max of 64 characters |
longDescription | String |
The long description, max of 128 characters |
publisher | String |
The publisher, max of 64 characters |
Get the small icon image as a pngjs PNG object
Kind: instance method of SMDH
Returns: Promise.<PNG>
- A promise with a pngjs PNG object
Param | Type | Description |
---|---|---|
[callback] | function |
An optional node.js style callback |
Get the small icon image as a pngjs PNG object
Kind: instance method of SMDH
Returns: Promise.<PNG>
- A promise with a pngjs PNG object
Param | Type | Description |
---|---|---|
[callback] | function |
An optional node.js style callback |
Sets the icon specified with iconSize
Kind: instance method of SMDH
Returns: Promise.<Buffer>
- The current SMDH buffer
Param | Type | Description |
---|---|---|
bitmap | BitmapObject |
A pngjs PNG-like object with RGBA bitmap data, width, and height. Must be either 24x24 or 48x48. |
iconSize | Integer |
The destination icon size, 24 sets the small icon, and 48 sets the large icon |
[callback] | function |
An optional node.js style callback |
Sets both the small and large icons
Kind: instance method of SMDH
Returns: Promise.<buffer>
- The current SMDH data buffer
Param | Type | Description |
---|---|---|
bitmap | BitmapObject |
A square bitmap object |
[callback] | function |
An optional node.js style callback |
Gets the current SMDH buffer
Kind: instance method of SMDH
Returns: Buffer
- The SMDH data buffer
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
shortDescription | String |
The short description |
longDescription | String |
The long description |
publisher | String |
The publisher |
A Buffer object that is exactly 0x200 bytes long
TitleObjects : Object.<TitleObject>
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
japanese | TitleObject |
The Japanese title object |
english | TitleObject |
The English title object |
french | TitleObject |
The French title object |
german | TitleObject |
The German title object |
italian | TitleObject |
The Italian title object |
spanish | TitleObject |
The Spanish title object |
simplifiedChinese | TitleObject |
The Simplified Chinese title object |
korean | TitleObject |
The Korean title object |
dutch | TitleObject |
The Dutch title object |
portuguese | TitleObject |
The Portuguese title object |
russian | TitleObject |
The Russian title object |
traditionalChinese | TitleObject |
The Traditional Chinese title object |
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
data | Buffer |
Raw RGBA bitmap data buffer |
width | Integer |
Image width |
height | Integer |
Image height |