quests

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

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

Go to latest
Published: Feb 22, 2019 License: Unlicense Imports: 10 Imported by: 2

Documentation

Overview

Package quests implements quest functions.

Index

Constants

This section is empty.

Variables

View Source
var (
	// QuestsData contains the data related to each quest ID.
	//
	// References:
	//    * https://github.com/sanctuary/notes/blob/master/enums.h#quest_id
	//
	// ref: 0x4A1AE0
	QuestsData = new([16]QuestData)

	// Quests contains the quests of the current game.
	//
	// PSX ref: 0x800DDA40
	// PSX def: QuestStruct quests[16];
	//
	// ref: 0x69BD10
	Quests = new([16]Quest)
)

Global variables.

Functions

func InitHallsOfTheBlindArea

func InitHallsOfTheBlindArea(xx, yy int32)

InitHallsOfTheBlindArea initializes the quest area of Halls of the Blind.

PSX ref: 0x8015F178 PSX def: void DrawBlind__Fii(int x, int y)

ref: 0x451E08

func InitOdgensSignArea

func InitOdgensSignArea(xxStart, yyStart int32)

InitOdgensSignArea initializes the quest area of Odgen's Sign.

PSX ref: 0x8015F09C PSX def: void DrawLTBanner__Fii(int x, int y)

ref: 0x451D7C

func InitQuestArea

func InitQuestArea(xx, yy int32)

InitQuestArea initializes the given quest area.

PSX ref: 0x8015F334 PSX def: void DRLG_CheckQuests__Fii(int x, int y)

ref: 0x451F20

func InitTheButcherArea

func InitTheButcherArea()

InitTheButcherArea initializes the quest area of The Butcher.

PSX ref: 0x8015ED8C PSX def: void DrawButcher__Fv()

ref: 0x451BEA

func InitTheChamberOfBoneArea

func InitTheChamberOfBoneArea(questID QuestID, xx, yy int32)

InitTheChamberOfBoneArea initializes the quest area of The Chamber of Bone.

PSX ref: 0x8015EF60 PSX def: void DrawSChamber__Fiii(int q, int x, int y)

ref: 0x451CC2

func InitTheCurseOfKingLeoricArea

func InitTheCurseOfKingLeoricArea(questID QuestID, xx, yy int32)

InitTheCurseOfKingLeoricArea initializes the quest area of The Curse of King Leoric.

PSX ref: 0x8015EDD0 PSX def: void DrawSkelKing__Fiii(int q, int x, int y)

ref: 0x451C11

func InitValorArea

func InitValorArea(xx, yy int32)

InitValorArea initializes the quest area of Valor.

PSX ref: 0x8015F254 PSX def: void DrawBlood__Fii(int x, int y)

ref: 0x451E94

func InitWarlordOfBloodArea

func InitWarlordOfBloodArea(xx, yy int32)

InitWarlordOfBloodArea initializes the quest area of Warlord of Blood.

PSX ref: 0x8015EE64 PSX def: void DrawWarLord__Fii(int x, int y)

ref: 0x451C32

func IsActive

func IsActive(questNum QuestID) bool

IsActive reports whether the given quest is active.

NOTE: questNum and questID are equivalent, as indicated by this function.

PSX ref: 0x80067B70 PSX def: unsigned char QuestStatus__Fi(int i)

ref: 0x451831

Types

type Quest

type Quest struct {
	// offset 00000000
	DLvl uint8
	// offset 00000001
	ID QuestID
	// offset 00000002
	Active bool

	// offset 00000004
	EnteranceX int32
	// offset 00000008
	EnteranceY int32
	// offset 0000000C
	QuestLevel uint8

	// offset 0000000E
	SpeechID uint8
	// offset 0000000F
	Var1 uint8

	// offset 00000014
	SpeechSpoken int32
	// contains filtered or unexported fields
}

Quest describes in-game state of any quest.

PSX def:

typedef struct QuestStruct {
   unsigned char _qlevel;
   unsigned char _qtype;
   unsigned char _qactive;
   unsigned char _qlvltype;
   int _qtx;
   int _qty;
   unsigned char _qslvl;
   unsigned char _qidx;
   unsigned char _qmsg;
   unsigned char _qvar1;
   unsigned char _qvar2;
   unsigned char _qlog;
   unsigned char pad_for_laz;
} QuestStruct;

type QuestData

type QuestData struct {
	// offset: 00000000
	DLvl uint8

	// offset: 00000003
	ID QuestID

	// offset: 00000008
	Multiplayer bool
	// contains filtered or unexported fields
}

PSX def:

typedef struct QuestData {
   unsigned char _qdlvl;
   char _qdmultlvl;
   unsigned char _qlvlt;
   unsigned char _qdtype;
   unsigned char _qdrnd;
   unsigned char _qslvl;
   unsigned char _qflags;
   int _qdmsg;
   int _qlstr;
} QuestData;

type QuestID

type QuestID uint8

A QuestID represents a specific quest.

const (
	TheMagicRock         QuestID = 0
	BlackMushroom        QuestID = 1
	GharbadTheWeak       QuestID = 2
	ZharTheMad           QuestID = 3
	Lachdanan            QuestID = 4
	Diablo               QuestID = 5
	TheButcher           QuestID = 6
	OgdensSign           QuestID = 7
	HallsOfTheBlind      QuestID = 8
	Valor                QuestID = 9
	AnvilOfFury          QuestID = 10
	WarlordOfBlood       QuestID = 11
	TheCurseOfKingLeoric QuestID = 12
	PoisonedWaterSupply  QuestID = 13
	TheChamberOfBone     QuestID = 14
	ArchbishopLazarus    QuestID = 15
	Invalid              QuestID = 0xFF
)

Quest IDs.

func (*QuestID) Set

func (q *QuestID) Set(s string) error

Sets sets the quest ID based on the given string representation.

func (QuestID) String

func (q QuestID) String() string

String returns a string representation of the quest ID.

Jump to

Keyboard shortcuts

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