gamemodel

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2023 License: Apache-2.0, BSD-3-Clause, ISC Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GamePhase

type GamePhase int
const (
	LobbyPhase GamePhase = 1
	WaitingLoad
	InGame
)

type LobbyPlayer

type LobbyPlayer struct {
	PlayerID         uint32
	ConnID           uint32
	RoomNumber       int16
	Nickname         string `struct:"[22]byte"`
	Rank             byte
	Unknown          uint32
	Badge            uint32
	Unknown2         uint32
	Unknown3         uint32
	Unknown4         byte
	GuildEmblemImage string `struct:"[18]byte"`
	GlobalID         string `struct:"[128]byte"`
}

type RoomAction

type RoomAction struct {
	ActionType  byte
	Rotation    *RoomActionRotation `struct-if:"ActionType == 0"`
	PositionAbs *RoomActionRotation `struct-if:"ActionType == 4"`
	PositionRel *RoomActionRotation `struct-if:"ActionType == 6"`
	Emote       *common.PString     `struct-if:"ActionType == 7"`
	Departure   *uint32             `struct-if:"ActionType == 8"`
}

type RoomActionPosition

type RoomActionPosition struct {
	X, Y, Z float32
}

type RoomActionRotation

type RoomActionRotation struct {
	Z float32
}

type RoomHole added in v0.0.3

type RoomHole struct {
	Course  byte
	HoleNum uint8
	HoleID  uint32
	Pin     uint8
	Par     uint8
	TeeX    float32
	TeeZ    float32
	PinX    float32
	PinZ    float32
}

type RoomInfo

type RoomInfo struct {
	PlayerCount uint32
	NumHoles    uint8
	Unknown     uint32
	Course      uint8
	RoomType    uint8
	Mode        uint8
	Trophy      uint32
	Users       []RoomInfoPlayer `struct:"sizefrom=UserCount"`
}

Used when viewing room info in the lobby.

type RoomInfoPlayer

type RoomInfoPlayer struct {
	ConnID      uint32
	Rank        uint8
	Unknown     uint8
	PlayerFlags uint32
	TitleID     uint32
	Unknown2    uint32
}

type RoomPlayerEntry

type RoomPlayerEntry struct {
	ConnID           uint32
	Nickname         string `struct:"[22]byte"`
	GuildName        string `struct:"[17]byte"`
	Slot             uint8
	PlayerFlags      uint32 // (I think GM flag goes here!)
	TitleID          uint32
	CharTypeID       uint32
	BackgroundTypeID uint32
	FrameTypeID      uint32
	StickerTypeID    uint32
	SlotTypeID       uint32
	CutInTypeID      uint32
	TitleTypeID      uint32
	StatusFlags      RoomStatusFlag
	Rank             uint8
	Unknown          uint16
	GuildID          uint32
	GuildEmblemImage string `struct:"[12]byte"`
	PlayerID         uint32
	Unknown2         uint32
	Unknown3         uint8 // <-- suspect, this may not be in the right place
	LoungeState      uint32
	Unknown4         uint16
	X                float32
	Y                float32
	Z                float32
	Angle            float32
	Unknown5         uint32
	ShopUnknown      uint32
	ShopName         string `struct:"[64]byte"`
	MascotTypeID     uint32
	GlobalID         string `struct:"[22]byte"`
	Unknown6         [106]byte
	Guest            bool `struct:"byte"`
	AverageScore     float32
	CharacterData    pangya.PlayerCharacterData
}

type RoomSettingsChange

type RoomSettingsChange struct {
	Type             byte
	RoomName         *common.PString `struct-if:"Type == 0"`
	Password         *common.PString `struct-if:"Type == 1"`
	RoomType         *byte           `struct-if:"Type == 2"`
	Course           *byte           `struct-if:"Type == 3"`
	NumHoles         *uint8          `struct-if:"Type == 4"`
	HoleProgression  *uint8          `struct-if:"Type == 5"`
	ShotTimerSeconds *uint8          `struct-if:"Type == 6"`
	MaxUsers         *uint8          `struct-if:"Type == 7"`
	GameTimerMinutes *uint8          `struct-if:"Type == 8"`
	ArtifactID       *uint32         `struct-if:"Type == 13"`
	NaturalWind      *uint32         `struct-if:"Type == 14"`
}

type RoomState

type RoomState struct {
	Active          bool
	Open            bool
	ShotTimerMS     uint32
	GameTimerMS     uint32
	NumUsers        uint8
	MaxUsers        uint8
	RoomType        byte
	NumHoles        byte
	CurrentHole     byte
	HoleProgression byte
	Course          byte
	RoomName        string
	RoomNumber      int16
	Password        string
	OwnerConnID     uint32
	NaturalWind     uint32

	StartPlayers int
	GamePhase    GamePhase
	ShotSync     *ShotSyncData
	Holes        []RoomHole
	ActiveConnID uint32
}

type RoomStatusFlag

type RoomStatusFlag uint16
const (
	RoomStateUnknown1 RoomStatusFlag = 1 << iota
	RoomStateUnknown2
	RoomStateAway
	RoomStateMaster
	RoomStateUnknown3
	RoomStateUnknown4
	RoomStateUnknown5
	RoomStateUnknown6
	RoomStateUnknown7
	RoomStateReady
)

type ShotSyncData

type ShotSyncData struct {
	ActiveConnID uint32
	X, Y, Z      float32
	Unknown1     [3]byte
	Pang         uint32
	BonusPang    uint32
	Unknown2     [11]byte
}

Jump to

Keyboard shortcuts

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