content

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2026 License: GPL-3.0 Imports: 0 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

type AgeRating struct {
	System string `json:"system"`
	Rating string `json:"rating"`
}

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

type GameCheat struct {
	Name string `json:"name"`
	Code string `json:"code"`
}

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

type Publisher struct {
	Name    string   `json:"name"`
	Regions []string `json:"regions"`
}

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).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL