cloud-game/pkg/emulator/emulator.go
sergystepanov 69ff8ae896
Update cloud data storage functionality (#349)
Add Oracle Data Storage support for cloud saves.
2021-09-20 10:17:59 +03:00

43 lines
1 KiB
Go

package emulator
import "github.com/giongto35/cloud-game/v2/pkg/emulator/image"
// CloudEmulator is the interface of cloud emulator.
type CloudEmulator interface {
// LoadMeta returns meta data of emulator. Refer below
LoadMeta(path string) Metadata
// Start is called after LoadGame
Start()
// SetViewport sets viewport size
SetViewport(width int, height int)
// GetViewport debug encoder image
GetViewport() interface{}
// SaveGame save game state
SaveGame() error
// LoadGame load game state
LoadGame() error
// GetHashPath returns the path emulator will save state to
GetHashPath() string
// Close will be called when the game is done
Close()
ToggleMultitap() error
}
type Metadata struct {
// the full path to some emulator lib
LibPath string
// the full path to the emulator config
ConfigPath string
AudioSampleRate int
Fps float64
BaseWidth int
BaseHeight int
Ratio float64
Rotation image.Rotate
IsGlAllowed bool
UsesLibCo bool
AutoGlContext bool
HasMultitap bool
}