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 ¶
const ( IconTextures resource.ID = 0x004C SmallTextures resource.ID = 0x004D MediumTextures resource.ID = 0x02C3 LargeTextures resource.ID = 0x03E8 ScreenTextures resource.ID = 0x0141 TextureNames resource.ID = 0x086A TextureUsages resource.ID = 0x086B )
Texture identifier are listed below.
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.
const ( VideoMailBitmapsStart resource.ID = 0x0A40 VideoMailAnimationsStart resource.ID = 0x0A4C )
Animation and video identifier are listed below.
const ( MovieIntro resource.ID = 0x0BD6 MovieDeath resource.ID = 0x0BD7 MovieEnd resource.ID = 0x0BD8 )
Movie identifier are listed below.
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.
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.
const ( TrapMessagesAudioStart resource.ID = 0x0C1C SoundEffectsAudioStart resource.ID = 0x00C9 )
Sound identifier are listed below.
const ( ArchiveName resource.ID = 0x0FA0 GameState resource.ID = 0x0FA1 LevelResourcesStart resource.ID = 4000 )
Archive identifier are listed below.
const (
GamePalettesStart resource.ID = 0x02BC
)
Palette identifier are listed below.
Variables ¶
var Archive = AnyLanguage("archive.dat")
Archive contains the game world.
var CitALog = I18nFile([resource.LanguageCount]string{"citalog.res", "frnalog.res", "geralog.res"})
CitALog contains all log audio.
var CitBark = I18nFile([resource.LanguageCount]string{"citbark.res", "frnbark.res", "gerbark.res"})
CitBark contains all bark audio.
var CitMat = AnyLanguage("citmat.res")
CitMat contains materials for 3D objects.
var CutsPal = AnyLanguage("cutspal.res")
CutsPal contains palettes for the cutscenes.
var CybStrng = I18nFile([resource.LanguageCount]string{"cybstrng.res", "frnstrng.res", "gerstrng.res"})
CybStrng contains all strings.
var Death = AnyLanguage("death.res")
Death contains another death video.
var DigiFX = AnyLanguage("digifx.res")
DigiFX contains all the effect sounds.
var GamePal = AnyLanguage("gamepal.res")
GamePal contains the game palettes.
var GameScr = AnyLanguage("gamescr.res")
GameScr contains big bitmaps.
var HandArt = AnyLanguage("handart.res")
HandArt contains bitmaps for grabbed things.
var Intro = AnyLanguage("intro.res")
Intro contains another intro video.
var LowDeth = AnyLanguage("lowdeth.res")
LowDeth contains the low-res death video.
var LowEnd = AnyLanguage("lowend.res")
LowEnd contains the low-res end video.
var LowIntr = I18nFile([resource.LanguageCount]string{"lowintr.res", "lofrintr.res", "logeintr.res"})
LowIntr contains the low-res intro video.
var MfdArt = I18nFile([resource.LanguageCount]string{"mfdart.res", "mfdfrn.res", "mfdger.res"})
MfdArt contains all MFD graphics.
var Obj3D = AnyLanguage("obj3D.res")
Obj3D contains 3D objects.
var ObjArt = AnyLanguage("objart.res")
ObjArt contains object art.
var ObjArt2 = AnyLanguage("objart2.res")
ObjArt2 contains further object art.
var ObjArt3 = AnyLanguage("objart3.res")
ObjArt3 contains further object art.
var SideArt = AnyLanguage("sideart.res")
SideArt contains bitmaps for the side buttons.
var Splash = AnyLanguage("splash.res")
Splash contains the splash screens.
var SplshPal = AnyLanguage("splspal.res")
SplshPal contains the splash screen palettes.
var Start1 = AnyLanguage("start1.res")
Start1 contains ... ?.
var SvgaDeth = AnyLanguage("svgadeth.res")
SvgaDeth contains the high-res death video.
var SvgaEnd = AnyLanguage("svgaend.res")
SvgaEnd contains the high-res end video.
var SvgaIntr = I18nFile([resource.LanguageCount]string{"svgaintr.res", "svfrintr.res", "svgeintr.res"})
SvgaIntr contains the high-res intro video.
var Texture = AnyLanguage("texture.res")
Texture contains all textures.
var VidMail = AnyLanguage("vidmail.res")
VidMail contains all video mails.
var Win1 = AnyLanguage("win1.res")
Win1 contains ... ?.
Functions ¶
func LocalizeFilename ¶
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.
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.
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.