50 void read_txa_file(std::istream &txa_file,
const std::string &txa_filename);
71 static const char *yesno(
bool flag);
74 static int _pi_version;
75 static int _min_pi_version;
76 static int _read_pi_version;
92 std::string _default_groupname;
93 std::string _default_groupdir;
99 std::string _generated_image_pattern;
100 std::string _map_dirname;
103 int _pal_x_size, _pal_y_size;
107 bool _omit_everything;
108 double _coverage_threshold;
110 bool _aggressively_clean_mapdir;
114 RemapUV _remap_uv, _remap_char_uv;
119 EggRenderMode::AlphaMode _cutout_mode;
120 double _cutout_ratio;
124 void compute_statistics(std::ostream &out,
int indent_level,
169 static void init_type() {
170 TypedWritable::init_type();
172 TypedWritable::get_class_type());
175 return get_class_type();
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
A class to retrieve the individual data elements previously stored in a Datagram.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
This represents a single egg file known to the palettizer.
An instance of this class is passed to the Factory when requesting it to do its business and construc...
The name of a file, such as a texture file or an Egg file.
This is the base class of a family of classes that represent particular image file types that PNMImag...
This is the highest level of grouping for TextureImages.
This is the main engine behind egg-palettize.
void set_noabs(bool noabs)
Changes the current setting of the noabs flag.
void process_all(bool force_texture_read, const Filename &state_filename)
Reprocesses all textures known.
PaletteGroup * test_palette_group(const std::string &name) const
Returns the PaletteGroup with the given name.
bool remove_egg_file(const std::string &name)
Removes the named egg file from the database, if it exists.
void process_command_line_eggs(bool force_texture_read, const Filename &state_filename)
Processes all the textures named in the _command_line_eggs, placing them on the appropriate palettes ...
TextureImage * get_texture(const std::string &name)
Returns the TextureImage with the given name.
void optimal_resize()
Attempts to resize each PalettteImage down to its smallest possible size.
PaletteGroup * get_default_group()
Returns the default group to which an egg file should be assigned if it is not mentioned in the ....
void all_params_set()
Called after all command line parameters have been set up, this is a hook to do whatever initializati...
static void register_with_read_factory()
Registers the current object as something that can be read from a Bam file.
virtual void finalize(BamReader *manager)
Called by the BamReader to perform any final actions needed for setting up the object after all objec...
EggFile * get_egg_file(const std::string &name)
Returns the EggFile with the given name.
PaletteGroup * get_palette_group(const std::string &name)
Returns the PaletteGroup with the given name.
void add_command_line_egg(EggFile *egg_file)
Adds the indicated EggFile to the list of eggs that are considered to have been read on the command l...
bool write_eggs()
Adjusts the egg files to reference the newly generated textures, and writes them out.
bool is_valid() const
Returns true if the palette information file was read correctly, or false if there was some error and...
static RemapUV string_remap(const std::string &str)
Returns the RemapUV code corresponding to the indicated string, or RU_invalid if the string is invali...
void report_pi() const
Output a verbose description of all the palettization information to standard output,...
virtual void write_datagram(BamWriter *writer, Datagram &datagram)
Fills the indicated datagram up with a binary representation of the current object,...
void reset_images()
Throws away all of the current PaletteImages, so that new ones may be created (and the packing made m...
void read_txa_file(std::istream &txa_file, const std::string &txa_filename)
Reads in the .txa file and keeps it ready for matching textures and egg files.
virtual int complete_pointers(TypedWritable **p_list, BamReader *manager)
Called after the object is otherwise completely read from a Bam file, this function's job is to store...
void report_statistics() const
Output a report of the palettization effectiveness, texture memory utilization, and so on.
bool read_stale_eggs(bool redo_all)
Reads in any egg file that is known to be stale, even if it was not listed on the command line,...
bool get_noabs() const
Returns the current setting of the noabs flag.
void generate_images(bool redo_all)
Actually generates the appropriate palette and unplaced texture images into the map directories.
This represents a single source texture that is referenced by one or more egg files.
This corresponds to a particular assignment of a TextureImage with a PaletteGroup,...
This represents the .txa file (usually textures.txa) that contains the user instructions for resizing...
This is a single matching line in the .txa file.
TypeHandle is the identifier used to differentiate C++ class types.
Base class for objects that can be written to and read from Bam files.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.