d2app

package
v0.0.0-...-7f92c57 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: GPL-3.0 Imports: 40 Imported by: 0

Documentation

Overview

Package d2app contains the OpenDiablo2 application shell

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	*d2util.Logger

	*Options
	// contains filtered or unexported fields
}

App represents the main application for the engine

func Create

func Create(gitBranch, gitCommit string) *App

Create creates a new instance of the application

func (*App) LoadConfig

func (a *App) LoadConfig() (*d2config.Configuration, error)

LoadConfig loads the OpenDiablo2 config file

func (*App) Run

func (a *App) Run() (err error)

Run executes the application and kicks off the entire game process

func (*App) ToCharacterSelect

func (a *App) ToCharacterSelect(connType d2clientconnectiontype.ClientConnectionType, connHost string)

ToCharacterSelect forces the game to transition to the Character Select (load character) screen

func (*App) ToCinematics

func (a *App) ToCinematics()

ToCinematics forces the game to transition to the cinematics menu

func (*App) ToCreateGame

func (a *App) ToCreateGame(filePath string, connType d2clientconnectiontype.ClientConnectionType, host string)

ToCreateGame forces the game to transition to the Create Game screen

func (*App) ToCredits

func (a *App) ToCredits()

ToCredits forces the game to transition to the credits screen

func (*App) ToMainMenu

func (a *App) ToMainMenu(errorMessageOptional ...string)

ToMainMenu forces the game to transition to the Main Menu

func (*App) ToMapEngineTest

func (a *App) ToMapEngineTest(region, level int)

ToMapEngineTest forces the game to transition to the map engine test screen

func (*App) ToSelectHero

func (a *App) ToSelectHero(connType d2clientconnectiontype.ClientConnectionType, host string)

ToSelectHero forces the game to transition to the Select Hero (create character) screen

type Options

type Options struct {
	Debug *bool

	Server   *d2networking.ServerOptions
	LogLevel *d2util.LogLevel
	// contains filtered or unexported fields
}

Options is used to store all of the app options that can be set with arguments

Jump to

Keyboard shortcuts

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