cmdfx 0.2.1
Lightweight game engine for your terminal
Loading...
Searching...
No Matches
CmdFX_Scene Struct Reference

Represents a CmdFX Scene. More...

#include <scenes.h>

Public Attributes

int uid
 The unique identifier for the scene.
 
int width
 Represents the width of the scene.
 
int height
 Represents the height of the scene.
 
char ** data
 Represents the data of the scene.
 
char *** ansiData
 Represents the ANSI data of the scene.
 
int x
 Gets the x-coordinate of the scene.
 
int y
 Gets the y-coordinate of the scene.
 
int z
 Represents the Z index of the scene.
 

Detailed Description

Represents a CmdFX Scene.

A CmdFX Scene is a storage buffer for different characters on the screen. It is drawn using the cnvas API and should be used when displaying large amounts of characters at a time.

Member Data Documentation

◆ ansiData

char*** CmdFX_Scene::ansiData

Represents the ANSI data of the scene.

The ANSI data field is a 2D array of ANSI characters that represent the scene. Each array in the ANSI data field represents a row of characters on the screen. The width of the scene is the same as the width of each array in the ANSI data field. The height of the scene is the same as the number of arrays in the ANSI data field.

These characters are drawn using the Canvas API and will therefore disappear if a Sprite is drawn over them. The Scene Engine will automatically redraw the scene each frame if necessary.

◆ data

char** CmdFX_Scene::data

Represents the data of the scene.

The data field is a 2D array of characters that represent the scene. Each array in the data field represents a row of characters on the screen. The width of the scene is the same as the width of each array in the data field. The height of the scene is the same as the number of arrays in the data field.

These characters are drawn using the Canvas API and will therefore disappear if a Sprite is drawn over them. The Scene Engine will automatically redraw the scene each frame if necessary.

◆ height

int CmdFX_Scene::height

Represents the height of the scene.

The height of the scene is the number of characters that can be displayed vertically. This is the same as the number of arrays in the data field.

◆ uid

int CmdFX_Scene::uid

The unique identifier for the scene.

The unique identifier is a number that is assigned to the scene when it is created. This number is used to identify the scene when it is registered to the Scene Engine.

If this number is -1, the scene has not been registered to the Scene Engine.

◆ width

int CmdFX_Scene::width

Represents the width of the scene.

The width of the scene is the number of characters that can be displayed horizontally. This is the same as the width of each array in the data field.

◆ x

int CmdFX_Scene::x

Gets the x-coordinate of the scene.

The x-coordinate of the scene is the position of the top-left corner of the scene on the screen. This is the same as the x-coordinate of the scene when it is drawn using the Scene_draw function. If the scene is not currently drawn, it will be -1.

◆ y

int CmdFX_Scene::y

Gets the y-coordinate of the scene.

The y-coordinate of the scene is the position of the top-left corner of the scene on the screen. This is the same as the y-coordinate of the scene when it is drawn using the Scene_draw function. If the scene is not currently drawn, it will be -1.

◆ z

int CmdFX_Scene::z

Represents the Z index of the scene.

The Z index of the scene is the order in which the scene is drawn on the screen. Scenes with a higher Z index will be drawn on top of scenes with a lower Z index.


The documentation for this struct was generated from the following file: