gamecheats

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: 3 Imported by: 1 module, 0 packages

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 gamecheats loads a game's cheats: the database cheats from the emulator's cheats source and the custom cheats from its settings file. Both the Cheats page and the cheat engine use it, so they agree on which cheats exist and which are on.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseDatabase added in v0.8.0

func ParseDatabase(list []content.GameCheat, sys cheats.System, bigEndian bool) []cheats.Cheat

ParseDatabase parses the provider's cheats in order, keeping those that can be applied. Entries whose code does not parse are left out.

Types

type Custom

type Custom struct {
	storage.CustomCheat
	Cheat cheats.Cheat
	Err   error
}

Custom is a custom cheat with its parse result. Cheat is set, with the entry's name, when Err is nil.

func ParseCustom

func ParseCustom(list []storage.CustomCheat, sys cheats.System, bigEndian bool) []Custom

ParseCustom parses custom cheats

type Set

type Set struct {
	Database []cheats.Cheat // cheats from the emulator's source that can be applied
	Custom   []Custom       // custom cheats in settings order
}

Set is a game's cheats

func Load

func Load(gameID string, provider content.CheatsSource, settings *storage.GameSettingsFile, sys cheats.System, bigEndian bool) Set

Load gets a game's database cheats from provider and parses the custom cheats in settings. sys and bigEndian are the core's cheat system and memory byte order. A nil provider, or one with no entry for the game, means the game has no database cheats.

func (Set) Enabled

func (s Set) Enabled(settings *storage.GameSettingsFile) []cheats.Cheat

Enabled returns the cheats that are on, custom cheats first, each ID once

func (Set) NameOfID

func (s Set) NameOfID(id string, skip int) (name string, ok bool)

NameOfID returns the name of the cheat with the given ID. The custom cheat at index skip is not considered; pass -1 to consider them all. ok is false when no cheat has the ID.

Jump to

Keyboard shortcuts

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