ids

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package ids contains constants for all necessary identifier used in the world. This package contains resource identifier, filenames and other constants necessary for storage.

Index

Constants

View Source
const (
	IconTextures   resource.ID = 0x004C
	SmallTextures  resource.ID = 0x004D
	MediumTextures resource.ID = 0x02C3
	LargeTextures  resource.ID = 0x03E8

	TextureNames  resource.ID = 0x086A
	TextureUsages resource.ID = 0x086B
)

Texture identifier are listed below.

View Source
const (
	ObjectBitmaps         resource.ID = 0x0546
	ObjectTextureBitmaps  resource.ID = 0x01DB
	ObjectMaterialBitmaps resource.ID = 0x0884

	IconBitmaps     resource.ID = 0x004E
	GraffitiBitmaps resource.ID = 0x004F

	MfdDataBitmaps resource.ID = 0x0028
)

Bitmap identifier are listed below.

View Source
const (
	VideoMailBitmapsStart    resource.ID = 0x0A40
	VideoMailAnimationsStart resource.ID = 0x0A4C
)

Animation and video identifier are listed below.

View Source
const (
	MovieIntro resource.ID = 0x0BD6
	MovieDeath resource.ID = 0x0BD7
	MovieEnd   resource.ID = 0x0BD8
)

Movie identifier are listed below.

View Source
const (
	PaperTextsStart      resource.ID = 0x003C
	TrapMessageTexts     resource.ID = 0x0867
	WordTexts            resource.ID = 0x0868
	PanelNameTexts       resource.ID = 0x0869
	LogCategoryTexts     resource.ID = 0x0870
	VariousMessageTexts  resource.ID = 0x0871
	ScreenMessageTexts   resource.ID = 0x0877
	InfoNodeMessageTexts resource.ID = 0x0878
	AccessCardNameTexts  resource.ID = 0x0879
	DataletMessageTexts  resource.ID = 0x087A

	ObjectLongNames  resource.ID = 0x0024
	ObjectShortNames resource.ID = 0x086D
)

Text identifier are listed below.

View Source
const (
	MailsStart     resource.ID = 0x0989
	LogsStart      resource.ID = 0x09B8
	FragmentsStart resource.ID = 0x0A98

	MailsAudioStart resource.ID = 0x0989 + 300
	LogsAudioStart  resource.ID = 0x09B8 + 300
)

Message identifier are listed below.

View Source
const (
	TrapMessagesAudioStart resource.ID = 0x0C1C

	SoundEffectsAudioStart resource.ID = 0x00C9
)

Sound identifier are listed below.

View Source
const (
	ArchiveName resource.ID = 0x0FA0
	GameState   resource.ID = 0x0FA1

	LevelResourcesStart resource.ID = 4000
)

Archive identifier are listed below.

View Source
const (
	GamePalettesStart resource.ID = 0x02BC
)

Palette identifier are listed below.

Variables

View Source
var Archive = AnyLanguage("archive.dat")

Archive contains the game world.

View Source
var CitALog = I18nFile([resource.LanguageCount]string{"citalog.res", "frnalog.res", "geralog.res"})

CitALog contains all log audio.

View Source
var CitBark = I18nFile([resource.LanguageCount]string{"citbark.res", "frnbark.res", "gerbark.res"})

CitBark contains all bark audio.

View Source
var CitMat = AnyLanguage("citmat.res")

CitMat contains materials for 3D objects.

View Source
var CutsPal = AnyLanguage("cutspal.res")

CutsPal contains palettes for the cutscenes.

View Source
var CybStrng = I18nFile([resource.LanguageCount]string{"cybstrng.res", "frnstrng.res", "gerstrng.res"})

CybStrng contains all strings.

View Source
var Death = AnyLanguage("death.res")

Death contains another death video.

View Source
var DigiFX = AnyLanguage("digifx.res")

DigiFX contains all the effect sounds.

View Source
var GamePal = AnyLanguage("gamepal.res")

GamePal contains the game palettes.

View Source
var GameScr = AnyLanguage("gamescr.res")

GameScr contains big bitmaps.

View Source
var HandArt = AnyLanguage("handart.res")

HandArt contains bitmaps for grabbed things.

View Source
var Intro = AnyLanguage("intro.res")

Intro contains another intro video.

View Source
var LowDeth = AnyLanguage("lowdeth.res")

LowDeth contains the low-res death video.

View Source
var LowEnd = AnyLanguage("lowend.res")

LowEnd contains the low-res end video.

View Source
var LowIntr = I18nFile([resource.LanguageCount]string{"lowintr.res", "lofrintr.res", "logeintr.res"})

LowIntr contains the low-res intro video.

View Source
var MfdArt = I18nFile([resource.LanguageCount]string{"mfdart.res", "mfdfrn.res", "mfdger.res"})

MfdArt contains all MFD graphics.

View Source
var Obj3D = AnyLanguage("obj3D.res")

Obj3D contains 3D objects.

View Source
var ObjArt = AnyLanguage("objart.res")

ObjArt contains object art.

View Source
var ObjArt2 = AnyLanguage("objart2.res")

ObjArt2 contains further object art.

View Source
var ObjArt3 = AnyLanguage("objart3.res")

ObjArt3 contains further object art.

View Source
var SideArt = AnyLanguage("sideart.res")

SideArt contains bitmaps for the side buttons.

View Source
var Splash = AnyLanguage("splash.res")

Splash contains the splash screens.

View Source
var SplshPal = AnyLanguage("splspal.res")

SplshPal contains the splash screen palettes.

View Source
var Start1 = AnyLanguage("start1.res")

Start1 contains ... ?.

View Source
var SvgaDeth = AnyLanguage("svgadeth.res")

SvgaDeth contains the high-res death video.

View Source
var SvgaEnd = AnyLanguage("svgaend.res")

SvgaEnd contains the high-res end video.

View Source
var SvgaIntr = I18nFile([resource.LanguageCount]string{"svgaintr.res", "svfrintr.res", "svgeintr.res"})

SvgaIntr contains the high-res intro video.

View Source
var Texture = AnyLanguage("texture.res")

Texture contains all textures.

View Source
var VidMail = AnyLanguage("vidmail.res")

VidMail contains all video mails.

View Source
var Win1 = AnyLanguage("win1.res")

Win1 contains ... ?.

Functions

func LocalizeFilename

func LocalizeFilename(filename string) resource.Language

LocalizeFilename returns the language that the resource file would typically contain.

Types

type AnyLanguage added in v1.6.0

type AnyLanguage string

AnyLanguage is for generic resource files that are language agnostic.

func (AnyLanguage) For added in v1.6.0

func (any AnyLanguage) For(lang resource.Language) string

For returns the string itself.

func (AnyLanguage) Matches added in v1.6.0

func (any AnyLanguage) Matches(filename string) bool

Matches returns true if the given filename matches this one.

type Filename added in v1.6.0

type Filename interface {
	// For returns the name of the file for the given language.
	For(lang resource.Language) string

	// Matches returns true if the given filename matches the described one.
	Matches(filename string) bool
}

Filename defines a wrapper for a file that is possibly language-specific.

func LocalizedFiles

func LocalizedFiles() []Filename

LocalizedFiles returns the filename descriptors of all files that are localized.

type FilenameList added in v1.6.0

type FilenameList []Filename

FilenameList is a list of filenames.

func HighResVideos

func HighResVideos() FilenameList

HighResVideos returns the filename descriptors of all high-res videos.

func LowResVideos

func LowResVideos() FilenameList

LowResVideos returns the filename descriptors of all low-res videos.

func (FilenameList) Matches added in v1.6.0

func (list FilenameList) Matches(filename string) bool

Matches returns true if the given filename matches any of the contained entries.

type I18nFile added in v1.6.0

type I18nFile [resource.LanguageCount]string

I18nFile is for internationalized resource files - i.e., those that store resources per file.

func (I18nFile) For added in v1.6.0

func (spec I18nFile) For(lang resource.Language) string

For returns the string per language index.

func (I18nFile) Matches added in v1.6.0

func (spec I18nFile) Matches(filename string) bool

Matches returns true if the given filename matches one of the localized filenames.

type ResourceInfo

type ResourceInfo struct {
	// StartID is the first ID of the resource block (inclusive).
	StartID resource.ID
	// EndID is the last ID of the resource block (exclusive).
	EndID resource.ID

	// ContentType describes how to interpret resource data.
	ContentType resource.ContentType
	// Compound indicates whether the resource has a variable amount of blocks. Simple resources always have one block.
	Compound bool
	// Compressed indicates that the resource data shall be stored in compressed form.
	Compressed bool

	// List is set for compound resources that have an atomic resource per block.
	List bool
	// MaxCount describes how many resources can be stored at maximum. Zero for unlimited / defined somewhere else.
	MaxCount int

	// ResFile specifies the .res file in which this resource should be stored.
	ResFile Filename
}

ResourceInfo describes a group of resources with their default serialization properties.

func Info

func Info(id resource.ID) (ResourceInfo, bool)

Info returns the resource information for the identified resource.

type SoundEffectInfo added in v1.4.0

type SoundEffectInfo struct {
	// Name is the unique identifier for the effect source.
	Name string
	// Index refers to the audio index. Multiple effects may use the same audio. -1 indicates no audio mapped.
	AudioIndex int
}

SoundEffectInfo describes one sound effect in the game.

func SoundEffectsForAudio added in v1.4.0

func SoundEffectsForAudio(index int) []SoundEffectInfo

SoundEffectsForAudio returns the effect information that share the same audio.

Jump to

Keyboard shortcuts

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