TGuy 0.18.1
TrashGuy C library created to be easily usable from other languages with CFFI support.
Loading...
Searching...
No Matches
Public Attributes | List of all members
TrashGuyState Struct Reference

Public Attributes

unsigned first_element_frames_count
 
TGStrView sprite_right
 
TGStrView sprite_left
 
TGStrView sprite_can
 
TGStrView sprite_space
 
TGStrViewArr text
 
TGStrViewArr arena
 
unsigned cur_frame
 
unsigned max_frames
 
unsigned pos
 
unsigned facing_right
 
unsigned element_index
 
unsigned next_element_index
 
size_t buf_size
 
char * output_str
 
TGStrView views_mem []
 

Detailed Description

Struct to keep relevant TrashGuy data

Member Data Documentation

◆ arena

TGStrViewArr TrashGuyState::arena

array where we place current element

◆ buf_size

size_t TrashGuyState::buf_size

computed size of the buffer to store one frame as string representation

◆ cur_frame

unsigned TrashGuyState::cur_frame

current frame set, initially UINT_MAX

◆ first_element_frames_count

unsigned TrashGuyState::first_element_frames_count

number of frames spent to process first element, computed from spacing provided by the user:
(spacing + 1) * 2

◆ max_frames

unsigned TrashGuyState::max_frames

number of frames animation takes to complete -> 0 <= frame < max_frames

◆ output_str

char* TrashGuyState::output_str

optional pointer to output string is stored here

◆ sprite_can

TGStrView TrashGuyState::sprite_can

trash can sprite

◆ sprite_left

TGStrView TrashGuyState::sprite_left

when facing left

◆ sprite_right

TGStrView TrashGuyState::sprite_right

when facing right

◆ sprite_space

TGStrView TrashGuyState::sprite_space

empty space sprite

◆ text

TGStrViewArr TrashGuyState::text

elements for TrashGuy to process, each one can contain one or more characters

◆ views_mem

TGStrView TrashGuyState::views_mem[]

array of allocated views which are later distributed among fields


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