world

package
v0.0.0-...-8a42bd8 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AOT_DOOR  = 1
	AOT_ITEM  = 2
	AOT_EVENT = 5
)

Variables

This section is empty.

Functions

func CheckCollision

func CheckCollision(newPosition mgl32.Vec3, collisionEntities []fileio.CollisionEntity) *fileio.CollisionEntity

func CheckNearbyBoxClimb

func CheckNearbyBoxClimb(playerPosition mgl32.Vec3, collisionEntities []fileio.CollisionEntity) bool

func CheckRamp

func CheckRamp(entity *fileio.CollisionEntity) bool

func RemoveCollisionEntity

func RemoveCollisionEntity(collisionEntities []fileio.CollisionEntity, entityId int)

Types

type AotDoor

type AotDoor struct {
	Header                       AotHeader
	Bounds                       *geometry.Quad
	NextX, NextY, NextZ, NextDir int16
	Stage, Room, Camera          uint8
	NextFloor                    uint8
	TextureType                  uint8
	DoorType                     uint8
	KnockType                    uint8
	KeyId                        uint8
	KeyType                      uint8
	Free                         uint8
}

type AotHeader

type AotHeader struct {
	Aot   uint8
	Id    uint8
	Type  uint8
	Floor uint8
	Super uint8
}

type AotItem

type AotItem struct {
	Header          AotHeader
	Bounds          *geometry.Quad
	ItemId          uint16
	Amount          uint16
	ItemPickedIndex uint16
	Md1ModelId      uint8
	Act             uint8
}

type AotManager

type AotManager struct {
	Doors       []AotDoor
	Items       []AotItem
	Sprites     []fileio.ScriptInstrSceEsprOn
	AotTriggers []AotObject
}

func NewAotManager

func NewAotManager() *AotManager

func (*AotManager) AddAotTrigger

func (aotManager *AotManager) AddAotTrigger(aotInstruction fileio.ScriptInstrAotSet)

func (*AotManager) AddAotTrigger4p

func (aotManager *AotManager) AddAotTrigger4p(aotInstruction fileio.ScriptInstrAotSet4p)

func (*AotManager) AddDoorAot

func (aotManager *AotManager) AddDoorAot(aotInstruction fileio.ScriptInstrDoorAotSet)

func (*AotManager) AddDoorAot4p

func (aotManager *AotManager) AddDoorAot4p(aotInstruction fileio.ScriptInstrDoorAotSet4p)

func (*AotManager) AddItemAot

func (aotManager *AotManager) AddItemAot(aotInstruction fileio.ScriptInstrItemAotSet)

func (*AotManager) AddItemAot4p

func (aotManager *AotManager) AddItemAot4p(aotInstruction fileio.ScriptInstrItemAotSet4p)

func (*AotManager) AddScriptSprite

func (aotManager *AotManager) AddScriptSprite(sprite fileio.ScriptInstrSceEsprOn)

func (*AotManager) GetAotTriggerNearPlayer

func (aotManager *AotManager) GetAotTriggerNearPlayer(position mgl32.Vec3) *AotObject

func (*AotManager) GetDoorNearPlayer

func (aotManager *AotManager) GetDoorNearPlayer(position mgl32.Vec3) *AotDoor

func (*AotManager) ResetAotTrigger

func (aotManager *AotManager) ResetAotTrigger(aotInstruction fileio.ScriptInstrAotReset)

type AotObject

type AotObject struct {
	Header AotHeader
	Bounds *geometry.Quad
	Data   [6]uint8
}

type CameraSwitchHandler

type CameraSwitchHandler struct {
	CameraSwitches          []fileio.RVDHeader
	CameraSwitchTransitions map[int][]int
}

func NewCameraSwitchHandler

func NewCameraSwitchHandler(cameraSwitches []fileio.RVDHeader, maxCamerasInRoom int) *CameraSwitchHandler

func (*CameraSwitchHandler) GetCameraSwitchNewRegion

func (cameraSwitchHandler *CameraSwitchHandler) GetCameraSwitchNewRegion(position mgl32.Vec3, curCameraId int) *fileio.RVDHeader

type GameWorld

type GameWorld struct {
	AotManager *AotManager
	GameRoom   *Room
}

func NewGameWorld

func NewGameWorld() *GameWorld

func (*GameWorld) LoadNewRoom

func (gameWorld *GameWorld) LoadNewRoom(rdtOutput *fileio.RDTOutput)

type Room

type Room struct {
	CameraPositionData  []fileio.CameraInfo
	CameraSwitchHandler *CameraSwitchHandler
	CollisionEntities   []fileio.CollisionEntity
	MaxCamerasInRoom    int
}

func NewRoom

func NewRoom(rdtOutput *fileio.RDTOutput) *Room

func (*Room) ClampNewCameraId

func (room *Room) ClampNewCameraId(newCameraId int) int

Jump to

Keyboard shortcuts

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