#include <Texture.h>
      
    
Class CharSet
Inherits from ListenerObject
A texture to be displayed by a sprite. 
Definition at line 90 of file Texture.h.
 
      
    
      
        
        
          # TextureROMSpec
        
        
      
    
      
    
      
        
        
          # TextureStatus
        
        
      
    
      
    
      
        
        
          # addChar()
        
        
      
    
      
        
          | void Texture::addChar  | 
          ( | 
          const Point * |           texturePoint,  | 
        
        
           | 
           | 
          const uint32 * |           newChar ) | 
        
      
 
Add the color provided color data to a CHAR in the sprite's texture. 
- Parameters
 - 
  
    | texturePoint | Coordinate in texture's space of the CHAR to replace  | 
    | newChar | Color data array for the CHAR  | 
  
   
Definition at line 467 of file Texture.c.
 
 
      
        
        
          # constructor()
        
        
      
    
Class' constructor 
- Parameters
 - 
  
    | textureSpec | Specification that determines how to configure the texture  | 
    | id | Texture's identificator  | 
  
   
Definition at line 201 of file Texture.c.
 
 
      
        
        
          # decreaseUsageCount()
        
        
      
    
      
        
          | bool Texture::decreaseUsageCount  | 
          ( | 
           | ) | 
           | 
        
      
 
Decrease the usage count. 
Definition at line 336 of file Texture.c.
 
 
      
        
        
          # get()
        
        
      
    
Get a texture configured with the provided spec. 
- Parameters
 - 
  
    | textureClass | Class of texture to instantiate  | 
    | textureSpec | Spec used to select or initialize a texture with  | 
    | minimumSegment | Minimum BGMAP segment where to allocate the texture  | 
    | mustLiveAtEvenSegment | Required BGMAP segment where to allocate the texture  | 
    | scValue | SC configuration value for multi segment textures  | 
  
   
- Returns
 - Texture initialized with the provided spec 
 
Definition at line 45 of file Texture.c.
 
 
      
        
        
          # getCharSet()
        
        
      
    
Retrieve the texture's char set. 
- Parameters
 - 
  
    | loadIfNeeded | If true and the char set is not loaded, loads it  | 
  
   
- Returns
 - Texture's char set 
 
Definition at line 317 of file Texture.c.
 
 
      
        
        
          # getCols()
        
        
      
    
Retrieve the texture's horizontal size in tiles. 
- Returns
 - Horizontal size in tiles 
 
Definition at line 408 of file Texture.c.
 
 
      
        
        
          # getFrame()
        
        
      
    
Retrieve frame that species the block inside the map array to write to DRAM. 
- Returns
 - The frame that species the block inside the map array to write to DRAM 
 
Definition at line 401 of file Texture.c.
 
 
      
        
        
          # getId()
        
        
      
    
Retrieve the texture's identificator. 
- Returns
 - Texture's identificator 
 
Definition at line 276 of file Texture.c.
 
 
      
        
        
          # getNumberOfFrames()
        
        
      
    
      
        
          | uint32 Texture::getNumberOfFrames  | 
          ( | 
           | ) | 
           | 
        
      
 
Retrieve the number frames specified by the texture's spec. 
- Returns
 - Number frames specified by the texture's spec 
 
Definition at line 378 of file Texture.c.
 
 
      
        
        
          # getPalette()
        
        
      
    
      
        
          | uint8 Texture::getPalette  | 
          ( | 
           | ) | 
           | 
        
      
 
Retrieve the palette index used the graphical data. 
- Returns
 - Palette index used by the graphical data 
 
Definition at line 371 of file Texture.c.
 
 
      
        
        
          # getRows()
        
        
      
    
Retrieve the texture's vertical size in tiles. 
- Returns
 - Vertical size in tiles 
 
Definition at line 415 of file Texture.c.
 
 
      
        
        
          # getSpec()
        
        
      
    
Retrieve the texture's spec. 
- Returns
 - Specification that determines how to configure the texture 
 
Definition at line 310 of file Texture.c.
 
 
      
        
        
          # getTotalCols()
        
        
      
    
Retrieve the total horizontal size of the textures defined by the provided spec. 
- Parameters
 - 
  
    | textureSpec | Spec of which to compute the horizontal size  | 
  
   
- Returns
 - Total horizontal size of the textures defined by the provided spec 
 
Definition at line 103 of file Texture.c.
 
 
      
        
        
          # getTotalRows()
        
        
      
    
Retrieve the total vertical size of the textures defined by the provided spec. 
- Parameters
 - 
  
    | textureSpec | Spec of which to compute the vertical size  | 
  
   
- Returns
 - Total vertical size of the textures defined by the provided spec 
 
Definition at line 127 of file Texture.c.
 
 
      
        
        
          # getUsageCount()
        
        
      
    
      
        
          | int8 Texture::getUsageCount  | 
          ( | 
           | ) | 
           | 
        
      
 
Retrieve the usage count. 
- Returns
 - Usage count 
 
Definition at line 355 of file Texture.c.
 
 
      
        
        
          # increaseUsageCount()
        
        
      
    
      
        
          | void Texture::increaseUsageCount  | 
          ( | 
           | ) | 
           | 
        
      
 
Increase the usage count. 
Definition at line 329 of file Texture.c.
 
 
      
        
        
          # isAnimated()
        
        
      
    
      
        
          | bool Texture::isAnimated  | 
          ( | 
           | ) | 
           | 
        
      
 
Check if the texture is an animation or not. 
- Returns
 - True if the CharSet has an array of animation frames 
 
Definition at line 446 of file Texture.c.
 
 
      
        
        
          # isMultiframe()
        
        
      
    
      
        
          | bool Texture::isMultiframe  | 
          ( | 
           | ) | 
           | 
        
      
 
Check if the texture is a multiframe texture. 
- Returns
 - True if the texture is multiframe; false otherwise 
 
Definition at line 460 of file Texture.c.
 
 
      
        
        
          # isShared()
        
        
      
    
      
        
          | bool Texture::isShared  | 
          ( | 
           | ) | 
           | 
        
      
 
Check if the texture is a shared one. 
- Returns
 - True if the texture is shared; false otherwise 
 
Definition at line 429 of file Texture.c.
 
 
      
        
        
          # isSingleFrame()
        
        
      
    
      
        
          | bool Texture::isSingleFrame  | 
          ( | 
           | ) | 
           | 
        
      
 
Check if the texture has only one frame. 
- Returns
 - True if the texture has only one frame; false otherwise 
 
Definition at line 453 of file Texture.c.
 
 
      
        
        
          # isWritten()
        
        
      
    
      
        
          | bool Texture::isWritten  | 
          ( | 
           | ) | 
           | 
        
      
 
Check if the texture's data is completely writen to DRAM. 
- Returns
 - True if the texture's data is completely writing to DRAM 
 
Definition at line 422 of file Texture.c.
 
 
      
        
        
          # onEvent()
        
        
      
    
Process an event that the instance is listen for. 
- Parameters
 - 
  
    | eventFirer | ListenerObject that signals the event  | 
    | eventCode | Code of the firing event  | 
  
   
- Returns
 - False if the listener has to be removed; true to keep it 
 
Reimplemented from ListenerObject.
Definition at line 244 of file Texture.c.
 
 
      
        
        
          # prepare()
        
        
      
    
      
        
          | void Texture::prepare  | 
          ( | 
           | ) | 
           | 
        
      
 
Prepare the texture to write its graphical data to DRAM during the next render cycle. 
Definition at line 517 of file Texture.c.
 
 
      
        
        
          # putChar()
        
        
      
    
      
        
          | void Texture::putChar  | 
          ( | 
          const Point * |           texturePoint,  | 
        
        
           | 
           | 
          const uint32 * |           newChar ) | 
        
      
 
Replace a CHAR in the sprite's texture. 
- Parameters
 - 
  
    | texturePoint | Coordinate in texture's space of the CHAR to replace  | 
    | newChar | Color data array for the CHAR  | 
  
   
Definition at line 484 of file Texture.c.
 
 
      
        
        
          # putPixel()
        
        
      
    
      
        
          | void Texture::putPixel  | 
          ( | 
          const Point * |           texturePixel,  | 
        
        
           | 
           | 
          const Pixel * |           charSetPixel,  | 
        
        
           | 
           | 
          BYTE |           newPixelColor ) | 
        
      
 
Replace a pixel in the sprite's texture. 
- Parameters
 - 
  
    | texturePixel | Coordinate in texture's space of the CHAR to replace  | 
    | charSetPixel | Coordinate in CHAR space of the CHAR to replace  | 
    | newPixelColor | Color data array for the CHAR  | 
  
   
Definition at line 501 of file Texture.c.
 
 
      
        
        
          # release()
        
        
      
    
  
  
      
        
          | static void Texture::release  | 
          ( | 
          Texture |           texture | ) | 
           | 
         
       
   | 
  
staticprivate   | 
  
 
Release a texture. 
- Parameters
 - 
  
  
 
Definition at line 76 of file Texture.c.
 
 
      
        
        
          # rewrite()
        
        
      
    
  
  
      
        
          | void Texture::rewrite  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
virtual   | 
  
 
Rewrite graphical data to the allocated DRAM space. 
Reimplemented in BgmapTexture.
Definition at line 595 of file Texture.c.
 
 
      
        
        
          # setFrame()
        
        
      
    
      
        
          | void Texture::setFrame  | 
          ( | 
          uint16 |           frame | ) | 
           | 
        
      
 
Write to DRAM the graphical data of the map that corresponds to the specified frame. 
- Parameters
 - 
  
    | frame | The frame that species the block inside the map array to write to DRAM  | 
  
   
Definition at line 385 of file Texture.c.
 
 
      
        
        
          # setPalette()
        
        
      
    
      
        
          | void Texture::setPalette  | 
          ( | 
          uint8 |           palette | ) | 
           | 
        
      
 
Set the palette index to use by the graphical data. 
- Parameters
 - 
  
    | palette | Palette index to use by the graphical data  | 
  
   
Definition at line 362 of file Texture.c.
 
 
      
        
        
          # setSpec()
        
        
      
    
Set the texture's spec. 
- Parameters
 - 
  
    | textureSpec | Specification that determines how to configure the texture  | 
  
   
Definition at line 283 of file Texture.c.
 
 
      
        
        
          # update()
        
        
      
    
      
        
          | bool Texture::update  | 
          ( | 
          int16 |           maximumTextureRowsToWrite | ) | 
           | 
        
      
 
Update the texture's underlying graphics. 
- Parameters
 - 
  
    | maximumTextureRowsToWrite | Number of texture rows to write during this call  | 
  
   
 
 
      
        
        
          # updateTextures()
        
        
      
    
  
  
      
        
          | static void Texture::updateTextures  | 
          ( | 
          int16 |           maximumTextureRowsToWrite,  | 
         
        
           | 
           | 
          bool |           defer ) | 
         
       
   | 
  
staticprivate   | 
  
 
Update texture pending rewriting of data in DRAM. 
- Parameters
 - 
  
    | maximumTextureRowsToWrite | Number of texture rows to write during this call  | 
    | defer | If true, the texture data is written overtime; otherwise all is written in a single pass  | 
  
   
Definition at line 95 of file Texture.c.
 
 
      
        
        
          # write()
        
        
      
    
  
  
      
        
          | bool Texture::write  | 
          ( | 
          int16 |           maximumTextureRowsToWrite | ) | 
           | 
         
       
   | 
  
virtual   | 
  
 
Write graphical data to the allocated DRAM space. 
- Parameters
 - 
  
    | maximumTextureRowsToWrite | Number of texture rows to write during this call  | 
  
   
- Returns
 - True if the texture was written; false if it fails 
 
Reimplemented in BgmapTexture.
Definition at line 577 of file Texture.c.
 
 
      
    
      
        
        
          # charSet
        
        
      
    
Char set that holds the pixel data used by the texture. 
Definition at line 96 of file Texture.h.
 
 
      
        
        
          # doUpdate
        
        
      
    
Pointer to the implementation that updates graphical data in DRAM. 
Definition at line 93 of file Texture.h.
 
 
      
        
        
          # frame
        
        
      
    
Indicator of the block inside the map array to write to DRAM. 
Definition at line 108 of file Texture.h.
 
 
      
        
        
          # id
        
        
      
    
      
        
        
          # mapDisplacement
        
        
      
    
  
  
      
        
          | uint32 Texture::mapDisplacement | 
         
       
   | 
  
private   | 
  
 
Displacement inside the map array modified according to the frame's value. 
Definition at line 102 of file Texture.h.
 
 
      
        
        
          # palette
        
        
      
    
Palette index to use by the graphical data. 
Definition at line 111 of file Texture.h.
 
 
      
        
        
          # status
        
        
      
    
Writing status flag. 
Definition at line 114 of file Texture.h.
 
 
      
        
        
          # textureSpec
        
        
      
    
Spec used to configure the texture. 
Definition at line 99 of file Texture.h.
 
 
      
        
        
          # update
        
        
      
    
Flag to signal that the texture needs to update DRAM in the next render cycle. 
Definition at line 120 of file Texture.h.
 
 
      
        
        
          # usageCount
        
        
      
    
Number of references to this texture instance. 
Definition at line 117 of file Texture.h.
 
 
The documentation for this class was generated from the following files:
- VUEngine-Core/source/Component/VisualComponent/Sprite/Texture/Texture.h
 
- VUEngine-Core/source/Component/VisualComponent/Sprite/Texture/Texture.c