Panda3D
Loading...
Searching...
No Matches
Public Member Functions | List of all members
TxaLine Class Reference

This is a single matching line in the .txa file. More...

#include "txaLine.h"

Public Member Functions

bool match_egg (EggFile *egg_file) const
 Compares the patterns on the line to the indicated EggFile.
 
bool match_texture (TextureImage *texture) const
 Compares the patterns on the line to the indicated TextureImage.
 
void output (std::ostream &out) const
 
bool parse (const std::string &line)
 Accepts a string that defines a line of the .txa file and parses it into its constinuent parts.
 

Detailed Description

This is a single matching line in the .txa file.

It consists of a list of names (texture names or egg file names), followed by a colon and an optional size and a set of keywords.

Definition at line 36 of file txaLine.h.

Constructor & Destructor Documentation

◆ TxaLine()

TxaLine::TxaLine ( )

Definition at line 30 of file txaLine.cxx.

Member Function Documentation

◆ match_egg()

bool TxaLine::match_egg ( EggFile * egg_file) const

Compares the patterns on the line to the indicated EggFile.

If they match, updates the egg with the appropriate information. Returns true if a match is detected and the search for another line should stop, or false if a match is not detected (or if the keyword "cont" is present, which means the search should continue regardless).

Definition at line 329 of file txaLine.cxx.

References EggFile::clear_surprise(), and EggFile::match_txa_groups().

◆ match_texture()

bool TxaLine::match_texture ( TextureImage * texture) const

Compares the patterns on the line to the indicated TextureImage.

If they match, updates the texture with the appropriate information. Returns true if a match is detected and the search for another line should stop, or false if a match is not detected (or if the keyword "cont" is present, which means the search should continue regardless).

Definition at line 387 of file txaLine.cxx.

References TextureImage::get_preferred_source(), SourceTextureImage::get_size(), ImageFile::get_x_size(), ImageFile::get_y_size(), PaletteGroups::make_union(), and PaletteGroups::remove_null().

◆ output()

void TxaLine::output ( std::ostream & out) const

Definition at line 527 of file txaLine.cxx.

◆ parse()

bool TxaLine::parse ( const std::string & line)

Accepts a string that defines a line of the .txa file and parses it into its constinuent parts.

Returns true if successful, false on error.

Definition at line 58 of file txaLine.cxx.

References extract_words(), PaletteGroups::insert(), GlobPattern::set_case_sensitive, EggRenderMode::string_alpha_mode(), EggTexture::string_format(), EggTexture::string_quality_level(), string_to_double(), string_to_int(), EggTexture::string_wrap_mode(), and Palettizer::test_palette_group().

Referenced by TxaFile::read().


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