|
TGuy 0.18.1
TrashGuy C library created to be easily usable from other languages with CFFI support.
|
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 [] |
Struct to keep relevant TrashGuy data
| TGStrViewArr TrashGuyState::arena |
array where we place current element
| size_t TrashGuyState::buf_size |
computed size of the buffer to store one frame as string representation
| unsigned TrashGuyState::cur_frame |
current frame set, initially UINT_MAX
| unsigned TrashGuyState::first_element_frames_count |
number of frames spent to process first element, computed from spacing provided by the user:
(spacing + 1) * 2
| unsigned TrashGuyState::max_frames |
number of frames animation takes to complete -> 0 <= frame < max_frames
| char* TrashGuyState::output_str |
optional pointer to output string is stored here
| TGStrView TrashGuyState::sprite_can |
trash can sprite
| TGStrView TrashGuyState::sprite_left |
when facing left
| TGStrView TrashGuyState::sprite_right |
when facing right
| TGStrView TrashGuyState::sprite_space |
empty space sprite
| TGStrViewArr TrashGuyState::text |
elements for TrashGuy to process, each one can contain one or more characters
| TGStrView TrashGuyState::views_mem[] |
array of allocated views which are later distributed among fields