Printer Class Reference
#include <Printer.h>
Inheritance diagram for Printer:
![](../class_printer.png)
# Public Types | |
enum | PrintingOrientation |
enum | PrintingDirection |
typedef const FontSpec | FontROMSpec |
typedef const FontData | FontROMData |
# Public Member Functions | |
override bool | onEvent (ListenerObject eventFirer, uint16 eventCode) |
override void | removedComponent (Component component) |
void | reset () |
Empties internal virtual list of registered fonts. |
# Static Public Member Functions | |
static void | setDebugMode () |
Set mode to debug to bypass loading fonts through CharSets. | |
static void | loadFonts (FontSpec **fontSpecs) |
static void | releaseFonts () |
Release fonts, free VRAM. | |
static void | clear () |
Clear printing area in BGMAP memory. | |
static void | clearRow (uint16 row) |
static void | text (const char *string, int32 x, int32 y, const char *font) |
static void | int32 (int32 value, uint8 x, uint8 y, const char *font) |
static void | hex (WORD value, uint8 x, uint8 y, uint8 length, const char *font) |
static void | float (float value, uint8 x, uint8 y, int32 precision, const char *font) |
static void | setFontPage (const char *font, uint16 page) |
static void | setOrientation (uint8 value) |
static void | setTextDirection (uint8 value) |
static void | addSprite () |
Create a printing sprite. | |
static bool | setActiveSprite (uint16 printingSpriteIndex) |
static void | printSprite (int16 x, int16 y) |
static void | setCoordinates (int16 x, int16 y, int16 z, int8 parallax) |
static void | setWorldCoordinates (int16 x, int16 y, int16 z, int8 parallax) |
static void | setBgmapCoordinates (int16 mx, int16 my, int8 mp) |
static void | setWorldSize (uint16 w, uint16 h) |
static void | setTransparency (uint8 transparency) |
static void | setPalette (uint8 palette) |
static void | resetCoordinates () |
Reset the coordinates of the WORLD used for printing. | |
static int16 | getWorldCoordinatesX () |
static int16 | getWorldCoordinatesY () |
static int16 | getWorldCoordinatesP () |
static PixelVector | getActiveSpritePosition () |
static FontData * | getFontByName (const char *font) |
static FontSize | getTextSize (const char *string, const char *font) |
# Protected Attributes | |
PrintingSprite | activePrintingSprite |
Active sprite that is manipulated by this class' interface. | |
const char * | lastUsedFont |
Cache the last used font to speed up searches. | |
FontData * | lastUsedFontData |
Cache the last used font data to speed up searches. | |
uint8 | mode |
Printer mode (Default or Debug) | |
uint8 | palette |
Palette to use for printing. | |
uint8 | orientation |
Printer orientation. | |
uint8 | direction |
Printer direction. | |
int8 | printingBgmapSegment |
Printer segment (BGMAP memory) |
# Additional Inherited Members | |
![]() | |
void | constructor () |
Class' constructor. | |
override bool | handleMessage (Telegram telegram) |
void | clearComponentLists (uint32 componentType) |
Component | addComponent (const ComponentSpec *componentSpec) |
void | removeComponent (Component component) |
void | addComponents (ComponentSpec **componentSpecs, uint32 componentType) |
void | removeComponents (uint32 componentType) |
Component | getComponentAtIndex (uint32 componentType, int16 componentIndex) |
VirtualList | getComponents (uint32 componentType) |
bool | getComponentsOfClass (ClassPointer classPointer, VirtualList components, uint32 componentType) |
uint16 | getComponentsCount (uint32 componentType) |
void | resetComponents () |
Reset components. | |
void | setVisible () |
Set this instance's visibility flag up. | |
const Transformation * | getTransformation () |
const Vector3D * | getPosition () |
const Rotation * | getRotation () |
const Scale * | getScale () |
Body | getBody () |
bool | isMoving () |
void | stopAllMovement () |
Stop all entity's movement. | |
void | stopMovement (uint16 axis) |
bool | setVelocity (const Vector3D *velocity, bool checkIfCanMove) |
const Vector3D * | getVelocity () |
fixed_t | getSpeed () |
fixed_t | getMaximumSpeed () |
fixed_t | getBounciness () |
fixed_t | getFrictionCoefficient () |
void | enableCollisions () |
Enable collision detection on the entity's colliders. | |
void | disableCollisions () |
Disable collision detection on the entity's colliders. | |
void | checkCollisions (bool activate) |
void | registerCollisions (bool activate) |
void | setCollidersLayers (uint32 layers) |
uint32 | getCollidersLayers () |
void | setCollidersLayersToIgnore (uint32 layersToIgnore) |
uint32 | getCollidersLayersToIgnore () |
bool | hasColliders () |
void | showColliders () |
Make the entity's colliders visible. | |
void | hideColliders () |
Make the entity's colliders invisible. | |
virtual void | createComponents (ComponentSpec **componentSpecs) |
virtual void | destroyComponents () |
Destroy the components that attach to this container. | |
virtual void | addedComponent (Component component) |
virtual void | show () |
Make this instance visible. | |
virtual void | hide () |
Make this instance invisible. | |
virtual void | calculateSize () |
Configure the entity's size. | |
virtual fixed_t | getRadius () |
virtual void | setPosition (const Vector3D *position) |
virtual void | setRotation (const Rotation *rotation) |
virtual void | setScale (const Scale *scale) |
virtual void | setDirection (const Vector3D *direction) |
virtual const Vector3D * | getDirection () |
virtual bool | applyForce (const Vector3D *force, bool checkIfCanMove) |
virtual bool | canMoveTowards (Vector3D direction) |
virtual bool | isSensibleToCollidingObjectBouncinessOnCollision (Entity collidingEntity) |
virtual bool | isSensibleToCollidingObjectFrictionOnCollision (Entity collidingEntity) |
virtual bool | isSubjectToGravity (Vector3D gravity) |
virtual bool | collisionStarts (const CollisionInformation *collisionInformation) |
virtual void | collisionPersists (const CollisionInformation *collisionInformation) |
virtual void | collisionEnds (const CollisionInformation *collisionInformation) |
virtual uint32 | getInGameType () |
![]() | |
VirtualList * | components |
Linked list of attached components. | |
Transformation | transformation |
3D transformation | |
Body | body |
bool | isVisible |
Flag used for streaming purposes. |
# Detailed Description
Class Printer
Inherits from ListenerObject
Manages printing layer and offers various functions to write to it.
# Member Typedef Documentation
# FontROMData
typedef const FontData FontROMData |
# FontROMSpec
typedef const FontSpec FontROMSpec |
# Member Enumeration Documentation
# PrintingDirection
enum PrintingDirection |
# PrintingOrientation
enum PrintingOrientation |
# Member Function Documentation
# addSprite()
|
static |
# clear()
|
static |
# clearRow()
|
static |
# float()
# getActiveSpritePosition()
|
static |
# getFontByName()
|
static |
# getTextSize()
|
static |
# getWorldCoordinatesP()
|
static |
# getWorldCoordinatesX()
|
static |
# getWorldCoordinatesY()
|
static |
# hex()
# int32()
# loadFonts()
|
static |
Add fonts to internal VirtualList and preload CharSets for specified fonts.
- Parameters
-
fontSpecs Array of font specs whose charset should pre preloaded
Must force CHAR defragmentation
# onEvent()
|
virtual |
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.
# printSprite()
# releaseFonts()
|
static |
# removedComponent()
|
virtual |
# reset()
secure void Printer::reset | ( | ) |
# resetCoordinates()
|
static |
# setActiveSprite()
# setBgmapCoordinates()
# setCoordinates()
# setDebugMode()
|
static |
# setFontPage()
|
static |
# setOrientation()
|
static |
Sets the orientation for the following call to print. Resets its self automatically to horizonal.
- Parameters
-
value PrintingOrientation
# setPalette()
|
static |
# setTextDirection()
|
static |
Sets the direction for the following call to print. Resets its self automatically to LTR (Left to Right).
- Parameters
-
value PrintingDirection
# setTransparency()
|
staticvirtual |
# setWorldCoordinates()
# setWorldSize()
# text()
# Member Data Documentation
# activePrintingSprite
|
protected |
# direction
# lastUsedFont
|
protected |
# lastUsedFontData
|
protected |
# mode
|
protected |
# orientation
# palette
|
protected |
# printingBgmapSegment
|
protected |
The documentation for this class was generated from the following files: