SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
Loading...
Searching...
No Matches
vtfpp::PSFrames Class Reference

Parses "frames" files as seen in The Orange Box PS3 port, in the TF/MOVIES.GRP file group. More...

#include <PSFrames.h>

Collaboration diagram for vtfpp::PSFrames:

Classes

struct  Frame

Public Member Functions

 PSFrames (std::vector< std::byte > &&psFramesData)
 PSFrames (std::span< const std::byte > psFramesData)
 PSFrames (const std::filesystem::path &psFramesPath)
 operator bool () const
uint32_t getFrameCount () const
uint32_t getFPS () const
uint16_t getWidth (uint32_t frame) const
uint16_t getHeight (uint32_t frame) const
std::span< const std::byte > getPaletteDataRaw (uint32_t frame) const
std::span< std::byte > getPaletteDataRaw (uint32_t frame)
std::vector< std::byte > getPaletteDataAs (ImageFormat newFormat, uint32_t frame) const
std::span< const std::byte > getImageDataRaw (uint32_t frame) const
std::span< std::byte > getImageDataRaw (uint32_t frame)
std::vector< std::byte > getImageDataAs (ImageFormat newFormat, uint32_t frame) const
std::vector< std::byte > getImageDataAsBGR888 (uint32_t frame) const

Protected Attributes

bool opened
uint32_t frameCount = 0
uint32_t fps = 0
std::vector< std::byte > data
std::vector< Frameframes

Detailed Description

Parses "frames" files as seen in The Orange Box PS3 port, in the TF/MOVIES.GRP file group.

Definition at line 12 of file PSFrames.h.

Constructor & Destructor Documentation

◆ PSFrames() [1/3]

PSFrames::PSFrames ( std::vector< std::byte > && psFramesData)
explicit

Definition at line 13 of file PSFrames.cpp.

◆ PSFrames() [2/3]

PSFrames::PSFrames ( std::span< const std::byte > psFramesData)
explicit

Definition at line 49 of file PSFrames.cpp.

◆ PSFrames() [3/3]

PSFrames::PSFrames ( const std::filesystem::path & psFramesPath)
explicit

Definition at line 52 of file PSFrames.cpp.

Member Function Documentation

◆ getFPS()

uint32_t PSFrames::getFPS ( ) const
nodiscard

Definition at line 63 of file PSFrames.cpp.

◆ getFrameCount()

uint32_t PSFrames::getFrameCount ( ) const
nodiscard

Definition at line 59 of file PSFrames.cpp.

◆ getHeight()

uint16_t PSFrames::getHeight ( uint32_t frame) const
nodiscard

Definition at line 71 of file PSFrames.cpp.

◆ getImageDataAs()

std::vector< std::byte > PSFrames::getImageDataAs ( ImageFormat newFormat,
uint32_t frame ) const
nodiscard

Definition at line 95 of file PSFrames.cpp.

◆ getImageDataAsBGR888()

std::vector< std::byte > PSFrames::getImageDataAsBGR888 ( uint32_t frame) const
nodiscard

Definition at line 100 of file PSFrames.cpp.

◆ getImageDataRaw() [1/2]

std::span< std::byte > PSFrames::getImageDataRaw ( uint32_t frame)
nodiscard

Definition at line 91 of file PSFrames.cpp.

◆ getImageDataRaw() [2/2]

std::span< const std::byte > PSFrames::getImageDataRaw ( uint32_t frame) const
nodiscard

Definition at line 87 of file PSFrames.cpp.

◆ getPaletteDataAs()

std::vector< std::byte > PSFrames::getPaletteDataAs ( ImageFormat newFormat,
uint32_t frame ) const
nodiscard

Definition at line 83 of file PSFrames.cpp.

◆ getPaletteDataRaw() [1/2]

std::span< std::byte > PSFrames::getPaletteDataRaw ( uint32_t frame)
nodiscard

Definition at line 79 of file PSFrames.cpp.

◆ getPaletteDataRaw() [2/2]

std::span< const std::byte > PSFrames::getPaletteDataRaw ( uint32_t frame) const
nodiscard

Definition at line 75 of file PSFrames.cpp.

◆ getWidth()

uint16_t PSFrames::getWidth ( uint32_t frame) const
nodiscard

Definition at line 67 of file PSFrames.cpp.

◆ operator bool()

PSFrames::operator bool ( ) const
explicitnodiscard

Definition at line 55 of file PSFrames.cpp.

Member Data Documentation

◆ data

std::vector<std::byte> vtfpp::PSFrames::data
protected

Definition at line 63 of file PSFrames.h.

◆ fps

uint32_t vtfpp::PSFrames::fps = 0
protected

Definition at line 61 of file PSFrames.h.

◆ frameCount

uint32_t vtfpp::PSFrames::frameCount = 0
protected

Definition at line 60 of file PSFrames.h.

◆ frames

std::vector<Frame> vtfpp::PSFrames::frames
protected

Definition at line 64 of file PSFrames.h.

◆ opened

bool vtfpp::PSFrames::opened
protected

Definition at line 58 of file PSFrames.h.


The documentation for this class was generated from the following files: