Chunk_terrain Class Reference

#include <chunkter.h>

Inheritance diagram for Chunk_terrain:

Inheritance graph
[legend]
Collaboration diagram for Chunk_terrain:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Chunk_terrain (unsigned char *data)
 Chunk_terrain (const Chunk_terrain &c2)
 ~Chunk_terrain ()
void add_client ()
void remove_client ()
bool is_modified ()
void set_modified (bool tf=true)
ShapeID get_flat (int tilex, int tiley) const
Shape_frameget_shape (int tilex, int tiley)
void set_flat (int tilex, int tiley, ShapeID id)
bool commit_edits ()
void abort_edits ()
Image_buffer8get_rendered_flats ()
GL_texshape * get_glflats ()
void render_all (int cx, int cy)
void write_flats (unsigned char *chunk_data)

Private Member Functions

void insert_in_queue ()
void remove_from_queue ()
void paint_tile (int tilex, int tiley)
Image_buffer8render_flats ()
void free_rendered_flats ()

Private Attributes

ShapeID shapes [256]
ShapeIDundo_shapes
int num_clients
bool modified
Image_buffer8rendered_flats
GL_texshape * glflats
Chunk_terrainrender_queue_next
Chunk_terrainrender_queue_prev

Static Private Attributes

static Chunk_terrainrender_queue
 Chunkter.cc - Chunk terrain (16x16 flat tiles) on the map.
static int queue_size

Detailed Description

Definition at line 36 of file chunkter.h.


Constructor & Destructor Documentation

Chunk_terrain::Chunk_terrain ( unsigned char *  data  ) 

Definition at line 109 of file chunkter.cc.

References c_tiles_per_chunk.

Chunk_terrain::Chunk_terrain ( const Chunk_terrain c2  ) 

Definition at line 130 of file chunkter.cc.

References c_tiles_per_chunk, and shapes.

Chunk_terrain::~Chunk_terrain (  ) 

Definition at line 147 of file chunkter.cc.


Member Function Documentation

void Chunk_terrain::insert_in_queue (  )  [private]

Definition at line 43 of file chunkter.cc.

Referenced by get_rendered_flats().

void Chunk_terrain::remove_from_queue (  )  [private]

Definition at line 70 of file chunkter.cc.

void Chunk_terrain::paint_tile ( int  tilex,
int  tiley 
) [inline, private]

Definition at line 93 of file chunkter.cc.

References c_tilesize, Shape_frame::get_data(), ShapeID::get_shape(), Shape_frame::is_rle(), and ShapeID::shape.

Here is the call graph for this function:

Image_buffer8 * Chunk_terrain::render_flats (  )  [private]

Definition at line 237 of file chunkter.cc.

References c_chunksize, c_tiles_per_chunk, Figure_queue_size(), free_rendered_flats(), GL_manager::get_instance(), render_queue_next, and render_queue_prev.

Referenced by get_rendered_flats().

Here is the call graph for this function:

void Chunk_terrain::free_rendered_flats (  )  [private]

Definition at line 274 of file chunkter.cc.

Referenced by render_flats().

void Chunk_terrain::add_client (  )  [inline]

Definition at line 65 of file chunkter.h.

References num_clients.

Referenced by Map_chunk::set_terrain().

void Chunk_terrain::remove_client (  )  [inline]

Definition at line 67 of file chunkter.h.

References num_clients.

bool Chunk_terrain::is_modified (  )  [inline]

Definition at line 69 of file chunkter.h.

References modified.

void Chunk_terrain::set_modified ( bool  tf = true  )  [inline]

Definition at line 71 of file chunkter.h.

References modified.

Referenced by Game_map::swap_terrains().

ShapeID Chunk_terrain::get_flat ( int  tilex,
int  tiley 
) const [inline]

Definition at line 78 of file chunkter.h.

References shapes.

Referenced by Map_chunk::get_flat(), Game_map::insert_terrain(), and Map_chunk::set_terrain().

Shape_frame* Chunk_terrain::get_shape ( int  tilex,
int  tiley 
) [inline]

Definition at line 81 of file chunkter.h.

References ShapeID::get_shape(), and shapes.

Here is the call graph for this function:

void Chunk_terrain::set_flat ( int  tilex,
int  tiley,
ShapeID  id 
)

Definition at line 165 of file chunkter.cc.

bool Chunk_terrain::commit_edits (  ) 

Definition at line 187 of file chunkter.cc.

void Chunk_terrain::abort_edits (  ) 

Definition at line 204 of file chunkter.cc.

Image_buffer8* Chunk_terrain::get_rendered_flats (  )  [inline]

Definition at line 89 of file chunkter.h.

References insert_in_queue(), render_flats(), render_queue, and rendered_flats.

Referenced by get_glflats(), and Map_chunk::get_rendered_flats().

Here is the call graph for this function:

GL_texshape* Chunk_terrain::get_glflats (  )  [inline]

Definition at line 97 of file chunkter.h.

References get_rendered_flats(), and glflats.

Referenced by Game_render::paint_chunk_flats().

Here is the call graph for this function:

void Chunk_terrain::render_all ( int  cx,
int  cy 
)

Definition at line 291 of file chunkter.cc.

References c_tiles_per_chunk, c_tilesize, Image_window8::copy8(), Shape_frame::get_data(), Game_window::get_scrolltx(), Game_window::get_scrollty(), ShapeID::get_shape(), Game_window::get_shape_location(), Game_window::get_win(), gwin, Shape_frame::is_rle(), Shape_manager::paint_shape(), ShapeID::shape, and Game_singletons::sman.

Referenced by Game_render::paint_terrain_only().

Here is the call graph for this function:

void Chunk_terrain::write_flats ( unsigned char *  chunk_data  ) 

Definition at line 325 of file chunkter.cc.

References c_tiles_per_chunk, ShapeID::framenum, and ShapeID::shapenum.


Member Data Documentation

ShapeID Chunk_terrain::shapes[256] [private]

Definition at line 38 of file chunkter.h.

Referenced by Chunk_terrain(), get_flat(), and get_shape().

ShapeID* Chunk_terrain::undo_shapes [private]

Definition at line 42 of file chunkter.h.

int Chunk_terrain::num_clients [private]

Definition at line 43 of file chunkter.h.

Referenced by add_client(), and remove_client().

bool Chunk_terrain::modified [private]

Definition at line 44 of file chunkter.h.

Referenced by is_modified(), and set_modified().

Image_buffer8* Chunk_terrain::rendered_flats [private]

Definition at line 45 of file chunkter.h.

Referenced by get_rendered_flats().

GL_texshape* Chunk_terrain::glflats [private]

Definition at line 46 of file chunkter.h.

Referenced by get_glflats().

Chunk_terrain * Chunk_terrain::render_queue [static, private]

Chunkter.cc - Chunk terrain (16x16 flat tiles) on the map.

Written: 7/6/01 - JSF

Definition at line 49 of file chunkter.h.

Referenced by get_rendered_flats().

int Chunk_terrain::queue_size [static, private]

Definition at line 50 of file chunkter.h.

Chunk_terrain* Chunk_terrain::render_queue_next [private]

Definition at line 51 of file chunkter.h.

Referenced by render_flats().

Chunk_terrain * Chunk_terrain::render_queue_prev [private]

Definition at line 51 of file chunkter.h.

Referenced by render_flats().


The documentation for this class was generated from the following files:
Generated on Mon Jul 9 14:48:31 2007 for ExultEngine by  doxygen 1.5.1