Quad

Quad

Total Size: 24 bytes

Offset (bytes)

Size (bytes)

Name

Description
Formula

0

2

m_face_indice_a

Face index A

2

2

m_face_indice_b

Face index B

4

2

m_face_indice_c

Face index C

6

2

m_face_indice_d

Face index D

8

2

m_uv1

UV coordinate 1

10

2

m_raw_clut

Raw CLUT value
\(((\text{raw_clut} \gg 6) ∣ (\text{raw_clut} \ll (16 - 6))) \;\&\; 15\)
https://www.godbolt.org/z/nMMhe8Ehh

12

2

m_uv2

UV coordinate 2

14

1

m_raw_texture_page

Raw texture page value
\((\text{raw_texture_page} \gg 4) \;\text{&}\; 15\)

15

1

m_raw_hide

Raw hide value
\(\text{raw_hide} \neq 0\)

16

2

m_uv3

UV coordinate 3

18

2

m_uv4

UV coordinate 4

20

3

m_color

Color value
(graphics::Color24RGB)

23

1

m_raw_gpu

Raw GPU flags

struct Quad

A class representing a Quad structure in FF8 battle stage.

Public Functions

inline RawClut clut() const noexcept

Get the CLUT value.

Returns:

The CLUT value.

inline RawClut &clut() noexcept

Get the CLUT value.

Returns:

The CLUT value.

inline constexpr std::uint8_t texture_page() const noexcept

Get the texture page value.

Returns:

The texture page value.

inline constexpr graphics::Bit4ValuesProxy<false> texture_page() noexcept

Get the texture page value.

Returns:

The texture page value.

inline constexpr auto color() const noexcept

Get the color value.

Returns:

The color value.

inline constexpr auto &color() noexcept

Get the color value.

Returns:

The color value.

inline bool hide() const noexcept

Check if the Quad is hidden.

Returns:

True if hidden, false otherwise.

inline constexpr unsigned char &raw_hide() noexcept

Check if the Quad is hidden.

Returns:

True if hidden, false otherwise.

inline constexpr unsigned char raw_hide() const noexcept

Check if the Quad is hidden.

Returns:

True if hidden, false otherwise.

template<std::size_t I> inline  requires (I< COUNT) const expr auto uv() const noexcept

Get the UV value for a specific vertex.

Template Parameters:

I – The index of the vertex.

Returns:

The UV value for the specified vertex.

template<std::size_t I> inline  requires (I< COUNT) const expr auto &uv() noexcept

Get the UV value for a specific vertex.

Template Parameters:

I – The index of the vertex.

Returns:

The UV value for the specified vertex.

template<std::size_t I> inline  requires (I< COUNT) const expr auto face_indice() const noexcept

Get the face index value for a specific vertex.

Template Parameters:

I – The index of the vertex.

Returns:

The face index value for the specified vertex.

template<std::size_t I> inline  requires (I< COUNT) const expr auto &face_indice() noexcept

Get the face index value for a specific vertex.

Template Parameters:

I – The index of the vertex.

Returns:

The face index value for the specified vertex.

inline auto face_indices() const noexcept

Generates a range view of face indices for the Quad.

Returns:

A range view representing the face indices.

inline auto face_indices() noexcept

Generates a range view of face indices for the Quad.

Returns:

A range view representing the face indices.

inline auto uvs() noexcept

Generates a range view of UV coordinates for the Quad.

Returns:

A range view representing the UV coordinates.

inline auto uvs() const noexcept

Generates a range view of UV coordinates for the Quad.

Returns:

A range view representing the UV coordinates.

inline GpuFlags &gpu() noexcept

Raw GPU flags.

inline GpuFlags gpu() const noexcept

Raw GPU flags.