Documentation
¶
Overview ¶
Package content defines the per-game data an emulator supplies to the desktop UI: game metadata and cheats. The JSON tags define the format emulators store their entries in. Entries are keyed by game ID, the product number read from the disc for disc systems.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgeRating ¶
AgeRating is one age rating of a title: the rating system, such as "ESRB", and the rating code as printed, such as "K-A".
type CheatsSource ¶
type CheatsSource interface {
// GameCheats returns the cheats for a game ID and true, or false when
// there is no entry for it.
GameCheats(gameID string) (GameCheats, bool)
}
CheatsSource supplies database cheats.
type CriticRating ¶
type CriticRating struct {
Source string `json:"source"`
Region string `json:"region"`
Scale float64 `json:"scale"`
Scores []CriticScore `json:"scores"`
}
CriticRating is one critic rating of a title: the source, such as "GamePro", the region, as named in GameMetadata.Regions, whose release it reviewed, the scale its scores are out of, and the scores as printed.
type CriticScore ¶
type CriticScore struct {
Category string `json:"category,omitempty"`
Score float64 `json:"score"`
}
CriticScore is one printed score of a review: a reviewer's score, or a category's score for a source that scores categories, such as "FunFactor".
type GameCheat ¶
GameCheat is one cheat: its name and its code string, in a cheat code format the desktop decodes.
type GameCheats ¶
type GameCheats struct {
Serial string `json:"serial"`
MasterCode string `json:"master_code,omitempty"`
Cheats []GameCheat `json:"cheats"`
}
GameCheats holds the cheats for one title. MasterCode is the code a cheat cartridge needs to hook the game, empty when none is known; the desktop does not apply it.
type GameMetadata ¶
type GameMetadata struct {
Serial string `json:"serial"`
Title string `json:"title"`
NativeTitle string `json:"native_title"`
Category string `json:"category"`
Regions []string `json:"regions"`
Languages []string `json:"languages"`
Barcodes []string `json:"barcodes"`
ReleaseDate string `json:"release_date"` // YYYY-MM-DD, or YYYY when only the year is known
Developer string `json:"developer"`
Publisher []Publisher `json:"publisher"`
Genres []string `json:"genres"`
MaxPlayers int `json:"max_players"`
Cooperative bool `json:"cooperative"`
AgeRatings []AgeRating `json:"age_ratings"`
CriticRatings []CriticRating `json:"critic_ratings"`
Overview string `json:"overview"`
}
GameMetadata describes one title.
type MetadataSource ¶
type MetadataSource interface {
// GameMetadata returns the metadata for a game ID and true, or false
// when there is no entry for it.
GameMetadata(gameID string) (GameMetadata, bool)
// AllGameMetadata returns every entry keyed by game ID. Each call
// returns a new map that the caller owns.
AllGameMetadata() map[string]GameMetadata
}
MetadataSource supplies game metadata.
type Publisher ¶
Publisher is one publisher of a title and the regions, as named in GameMetadata.Regions, it published the title in.
type RumbleSource ¶
type RumbleSource interface {
// GameRumble returns the rumble file named name and true, or false
// when there is none. name is a game ID for the file shared by all of
// the game's discs, or <gameID>.disc<n> for a file for disc n only.
GameRumble(name string) ([]byte, bool)
}
RumbleSource supplies .erumble rumble files (see the rumble module).