Documentation
¶
Overview ¶
Package gamedata holds per-title data embedded into erings.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Cheats embed.FS
Cheats holds one JSON file per title under cheats/, named by the same product number as the title's metadata file, for example cheats/GS-9001.json. Each file has the title's serial, the Action Replay master code when one is known, and the cheats as name and code pairs, one address and value pair per code line.
var Metadata embed.FS
Metadata holds one JSON file per title under metadata/, named by the product number read from the disc's IP header, for example metadata/GS-9001.json.
var Rumbles embed.FS
Rumbles holds the .erumble rumble files under rumbles/, named by the same product number as the title's metadata file, for example rumbles/T-14310G.erumble. A file for one disc of a multi-disc title adds the disc number, for example rumbles/T-1219H.disc2.erumble.
Functions ¶
This section is empty.
Types ¶
type CheatsSource ¶
type CheatsSource struct{}
CheatsSource supplies the embedded cheats to the desktop UI.
func (CheatsSource) GameCheats ¶
func (CheatsSource) GameCheats(serial string) (content.GameCheats, bool)
GameCheats decodes the embedded entry named by the product number, returning false when there is no entry or it cannot be decoded.
type MetadataSource ¶
type MetadataSource struct{}
MetadataSource supplies the embedded game metadata to the desktop UI.
func (MetadataSource) AllGameMetadata ¶
func (s MetadataSource) AllGameMetadata() map[string]content.GameMetadata
AllGameMetadata decodes every embedded entry into a new map keyed by product number, skipping any entry that cannot be decoded.
func (MetadataSource) GameMetadata ¶
func (MetadataSource) GameMetadata(serial string) (content.GameMetadata, bool)
GameMetadata decodes the embedded entry named by the product number, returning false when there is no entry or it cannot be decoded.
type RumbleSource ¶
type RumbleSource struct{}
RumbleSource supplies the embedded rumble files to the desktop UI.
func (RumbleSource) GameRumble ¶
func (RumbleSource) GameRumble(name string) ([]byte, bool)
GameRumble returns the embedded rumble file named by a product number, or a product number with a disc suffix such as T-1219H.disc2, returning false when there is none.