20 char** rows = calloc(1, height *
sizeof(
char*));
24 display->
width = width;
27 for (
int rowIndex = 0; rowIndex < height; rowIndex++)
29 char* row = calloc(1, width + 1);
54 if (display->
area != NULL)
56 for (
int rowIndex = 0; rowIndex < display->
height; rowIndex++)
58 free(display->
area[rowIndex]);
bool Display_Create(Display *display, int width, int height)
Create a "display" window in the given Display object, with the given width and height.
void Display_Destroy(Display *display)
Destroy the "display" window in the given Display object by releasing the memory associated with it....
Declaration of the Display_Create() and Display_Destroy() functions for managing the Display structur...
Represents a "display" window, in which to render Flyweight images. This "display" window is then pri...
int width
Width of each row.
int height
Height of each row.
char ** area
2-dimensional array of strings, representing rows. Each row is zero-terminated.