Panda3D
Public Member Functions

TxaLine Class Reference

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

#include "txaLine.h"

List of all members.

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 (ostream &out) const
bool parse (const 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 39 of file txaLine.h.


Member Function Documentation

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 340 of file txaLine.cxx.

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

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 403 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().

bool TxaLine::parse ( const 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 63 of file txaLine.cxx.

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

Referenced by TxaFile::read().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations