foundry.core.graphics_page package#

Submodules#

foundry.core.graphics_page.GraphicsGroup module#

class GraphicsGroup(pages: tuple[foundry.core.graphics_page.GraphicsPage.GraphicsPage, ...], animation_speed: int)#

Bases: ConcreteValidator, KeywordValidator

A representation of a series of graphical pages that could be animated.

Attributes:
pages: tuple[GraphicsPage, …]

The pages to be animated.

animation_speed: int

The animation speed in milliseconds.

animation_speed: int#
get_current_graphics_page(time: int) GraphicsPage#
property offsets: tuple[int]#
pages: tuple[foundry.core.graphics_page.GraphicsPage.GraphicsPage, ...]#
classmethod validate(values: Any) _KV#

Validates values by the predetermined kwargs validator suggestions with respect to the parent namespace passed inside values.

Parameters:
valuesAny

A series of values to be validated.

Returns:
_KV

The values validated and composed into its correct type.

Raises:
KeyError

The parent namespace was not defined inside values.

foundry.core.graphics_page.GraphicsPage module#

class GraphicsPage(index: int, path: pathlib.Path | None = None)#

Bases: ConcreteValidator, KeywordValidator

A representation of a single page of graphics inside the ROM, that uses attrs to create a basic implementation.

Attributes:
index: int

The index of the graphical page into the ROM.

path: Optional[Path]

The path to the file containing the bytes of the graphics page or ROM if None.

index: int#
property offset: int#
path: pathlib.Path | None#
classmethod validate(values: Any) _KV#

Validates values by the predetermined kwargs validator suggestions with respect to the parent namespace passed inside values.

Parameters:
valuesAny

A series of values to be validated.

Returns:
_KV

The values validated and composed into its correct type.

Raises:
KeyError

The parent namespace was not defined inside values.

Module contents#