f***ed up and needed to rework packages, added packages to master and merged
This commit is contained in:
parent
f7a87d7519
commit
6f0dd1edda
6 changed files with 4 additions and 404 deletions
|
|
@ -3,10 +3,8 @@ set(ARCHEUS_STD_NCURSES_CONSOLE_SOURCES
|
||||||
packages/console/ncurses/key.c
|
packages/console/ncurses/key.c
|
||||||
packages/console/ncurses/view.c
|
packages/console/ncurses/view.c
|
||||||
|
|
||||||
#TODO: probs want to change line.c to a shell class, and remove view
|
packages/console/ncurses/shell.c
|
||||||
#packages/console/ncurses/shell.c
|
packages/console/ncurses/buffer.c
|
||||||
#packages/console/ncurses/buffer/line.c
|
|
||||||
#packages/console/ncurses/buffer/view.c
|
|
||||||
)
|
)
|
||||||
|
|
||||||
function(ncurses_check_and_init_needed _ARCHEUS_STD_FLAGS _ARCHEUS_STD_SOURCES ARCHEUS_STD_CONSOLE_BACKEND)
|
function(ncurses_check_and_init_needed _ARCHEUS_STD_FLAGS _ARCHEUS_STD_SOURCES ARCHEUS_STD_CONSOLE_BACKEND)
|
||||||
|
|
|
||||||
|
|
@ -1,102 +0,0 @@
|
||||||
#ifndef ARC_CONSOLE_LINE_BUFFER_H_
|
|
||||||
#define ARC_CONSOLE_LINE_BUFFER_H_
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include "arc/console/view.h"
|
|
||||||
#include "arc/std/string.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief
|
|
||||||
*/
|
|
||||||
typedef struct ARC_ConsoleLineBuffer ARC_ConsoleLineBuffer;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief creates ARC_ConsoleLineBuffer type
|
|
||||||
*
|
|
||||||
* @param buffer ARC_ConsoleLineBuffer to create
|
|
||||||
*/
|
|
||||||
void ARC_ConsoleLineBuffer_Create(ARC_ConsoleLineBuffer **buffer);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief destroys ARC_ConsoleLineBuffer type
|
|
||||||
*
|
|
||||||
* @param buffer ARC_ConsoleLineBuffer to destroy
|
|
||||||
*/
|
|
||||||
void ARC_ConsoleLineBuffer_Destroy(ARC_ConsoleLineBuffer *buffer);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief clears the contents of a ARC_ConsoleLineBuffer
|
|
||||||
*
|
|
||||||
* @param buffer ARC_ConsoleLineBuffer to clear
|
|
||||||
*/
|
|
||||||
void ARC_ConsoleLineBuffer_Clear(ARC_ConsoleLineBuffer *buffer);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief renders a buffer to a ARC_ConsoleView
|
|
||||||
*
|
|
||||||
* @param buffer ARC_ConsoleLineBuffer to render
|
|
||||||
* @param view ARC_ConsoleView to render the buffer contents to
|
|
||||||
*/
|
|
||||||
void ARC_ConsoleLineBuffer_Render(ARC_ConsoleLineBuffer *buffer, ARC_ConsoleView *view);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief renders a section of buffer to a ARC_ConsoleView
|
|
||||||
*
|
|
||||||
* @param buffer ARC_ConsoleLineBuffer to render
|
|
||||||
* @param view ARC_ConsoleView to render the buffer contents to
|
|
||||||
* @param startIndex start index of buffer to render
|
|
||||||
* @param lines the number of lines of buffer to render
|
|
||||||
*/
|
|
||||||
void ARC_ConsoleLineBuffer_RenderSection(ARC_ConsoleLineBuffer *buffer, ARC_ConsoleView *view, uint32_t startIndex, uint32_t lines);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief adds a character to the buffer
|
|
||||||
*
|
|
||||||
* @param buffer ARC_ConsoleLineBuffer to add character to
|
|
||||||
* @param character char to add to ARC_ConsoleBuffer
|
|
||||||
*/
|
|
||||||
void ARC_ConsoleLineBuffer_AddChar(ARC_ConsoleLineBuffer *buffer, char character);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief adds an ARC_String to the buffer
|
|
||||||
*
|
|
||||||
* @param buffer ARC_ConsoleLineBuffer to add character to
|
|
||||||
* @param string ARC_String to add to ARC_ConsoleLineBuffer
|
|
||||||
*/
|
|
||||||
void ARC_ConsoleLineBuffer_AddString(ARC_ConsoleLineBuffer *buffer, ARC_String *string);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief adds a cstring to the buffer
|
|
||||||
*
|
|
||||||
* @param buffer ARC_ConsoleLineBuffer to add character to
|
|
||||||
* @param string cstring to add to ARC_ConsoleLineBuffer
|
|
||||||
* @param length the length of the c string to add
|
|
||||||
*/
|
|
||||||
void ARC_ConsoleLineBuffer_AddCString(ARC_ConsoleLineBuffer *buffer, char *cstring, uint64_t length);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief adds a cstring to the buffer with the cstrings string length
|
|
||||||
*
|
|
||||||
* @param buffer ARC_ConsoleLineBuffer to add character to
|
|
||||||
* @param string cstring to add to ARC_ConsoleLineBuffer
|
|
||||||
*/
|
|
||||||
void ARC_ConsoleLineBuffer_AddCStringWithStrlen(ARC_ConsoleLineBuffer *buffer, char *cstring);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief gets the number of lines from a console line buffer
|
|
||||||
*
|
|
||||||
* @param buffer ARC_ConsoleLineBuffer get number of lines from
|
|
||||||
*
|
|
||||||
* @return the number of lines within an ARC_ConsoleLineBuffer
|
|
||||||
*/
|
|
||||||
uint32_t ARC_ConsoleLineBuffer_GetLineNumbers(ARC_ConsoleLineBuffer *buffer);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif //!ARC_CONSOLE_LINE_BUFFER_H_
|
|
||||||
|
|
@ -1,98 +0,0 @@
|
||||||
#ifndef ARC_CONSOLE_VIEW_BUFFER_H_
|
|
||||||
#define ARC_CONSOLE_VIEW_BUFFER_H_
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include "arc/console/view.h"
|
|
||||||
#include "arc/math/point.h"
|
|
||||||
#include "arc/std/string.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief
|
|
||||||
*/
|
|
||||||
typedef struct ARC_ConsoleViewBuffer ARC_ConsoleViewBuffer;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief creates ARC_ConsoleViewBuffer type
|
|
||||||
*
|
|
||||||
* @param buffer ARC_ConsoleViewBuffer to create
|
|
||||||
*/
|
|
||||||
void ARC_ConsoleViewBuffer_Create(ARC_ConsoleViewBuffer **buffer, ARC_ConsoleView *view);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief destroys ARC_ConsoleViewBuffer type
|
|
||||||
*
|
|
||||||
* @param buffer ARC_ConsoleViewBuffer to destroy
|
|
||||||
*/
|
|
||||||
void ARC_ConsoleViewBuffer_Destroy(ARC_ConsoleViewBuffer *buffer);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief clears the contents of a ARC_ConsoleViewBuffer
|
|
||||||
*
|
|
||||||
* @param buffer ARC_ConsoleViewBuffer to clear
|
|
||||||
*/
|
|
||||||
void ARC_ConsoleViewBuffer_Clear(ARC_ConsoleViewBuffer *buffer);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief renders a buffer to a ARC_ConsoleView
|
|
||||||
*
|
|
||||||
* @param buffer ARC_ConsoleViewBuffer to render
|
|
||||||
* @param view ARC_ConsoleView to render the buffer contents to
|
|
||||||
*/
|
|
||||||
void ARC_ConsoleViewBuffer_Render(ARC_ConsoleViewBuffer *buffer, ARC_ConsoleView *view);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief renders a section of buffer to a ARC_ConsoleView
|
|
||||||
*
|
|
||||||
* @param buffer ARC_ConsoleViewBuffer to render
|
|
||||||
* @param view ARC_ConsoleView to render the buffer contents to
|
|
||||||
* @param startIndex start index of buffer to render
|
|
||||||
* @param lines the number of lines of buffer to render
|
|
||||||
*/
|
|
||||||
void ARC_ConsoleViewBuffer_RenderArea(ARC_ConsoleViewBuffer *buffer, ARC_ConsoleView *view, uint32_t startIndex, uint32_t lines);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief adds a character to the buffer
|
|
||||||
*
|
|
||||||
* @param buffer ARC_ConsoleViewBuffer to add character to
|
|
||||||
* @param character char to add to ARC_ConsoleBuffer
|
|
||||||
* @param pos position to add the char at
|
|
||||||
*/
|
|
||||||
void ARC_ConsoleViewBuffer_AddCharAt(ARC_ConsoleViewBuffer *buffer, char character, ARC_Point pos);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief adds an ARC_String to the buffer
|
|
||||||
*
|
|
||||||
* @param buffer ARC_ConsoleViewBuffer to add character to
|
|
||||||
* @param string ARC_String to add to ARC_ConsoleViewBuffer
|
|
||||||
* @param pos position to add the char at
|
|
||||||
*/
|
|
||||||
void ARC_ConsoleViewBuffer_AddStringAt(ARC_ConsoleViewBuffer *buffer, ARC_String *string, ARC_Point pos);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief adds a cstring to the buffer
|
|
||||||
*
|
|
||||||
* @param buffer ARC_ConsoleViewBuffer to add character to
|
|
||||||
* @param string cstring to add to ARC_ConsoleViewBuffer
|
|
||||||
* @param length the length of the c string to add
|
|
||||||
* @param pos position to add the char at
|
|
||||||
*/
|
|
||||||
void ARC_ConsoleViewBuffer_AddCString(ARC_ConsoleViewBuffer *buffer, char *cstring, uint64_t length);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief adds a cstring to the buffer with the cstrings string length
|
|
||||||
*
|
|
||||||
* @param buffer ARC_ConsoleViewBuffer to add character to
|
|
||||||
* @param string cstring to add to ARC_ConsoleViewBuffer
|
|
||||||
* @param pos position to add the char at
|
|
||||||
*/
|
|
||||||
void ARC_ConsoleViewBuffer_AddCStringWithStrlen(ARC_ConsoleViewBuffer *buffer, char *cstring);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // [!ARC_CONSOLE_VIEW_BUFFER_H_
|
|
||||||
|
|
@ -8,7 +8,7 @@ extern "C" {
|
||||||
//TODO: fix up this file
|
//TODO: fix up this file
|
||||||
|
|
||||||
#include "view.h"
|
#include "view.h"
|
||||||
//#include "buffer.h"
|
#include "buffer.h"
|
||||||
#include "arc/std/string.h"
|
#include "arc/std/string.h"
|
||||||
#include "arc/std/vector.h"
|
#include "arc/std/vector.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
@ -28,7 +28,7 @@ typedef void (* ARC_ConsoleShell_UpdateFn)(ARC_ConsoleShell *shell);
|
||||||
*/
|
*/
|
||||||
struct ARC_ConsoleShell {
|
struct ARC_ConsoleShell {
|
||||||
ARC_ConsoleView *view;
|
ARC_ConsoleView *view;
|
||||||
// ARC_ConsoleBuffer *buffer;
|
ARC_ConsoleBuffer *buffer;
|
||||||
uint32_t bufferLineIndex;
|
uint32_t bufferLineIndex;
|
||||||
|
|
||||||
ARC_Vector *history;
|
ARC_Vector *history;
|
||||||
|
|
|
||||||
|
|
@ -1,147 +0,0 @@
|
||||||
#include "arc/console/buffer/line.h"
|
|
||||||
|
|
||||||
#include "arc/console/view.h"
|
|
||||||
#include "arc/std/string.h"
|
|
||||||
#include "arc/std/vector.h"
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
struct ARC_ConsoleLineBuffer {
|
|
||||||
ARC_Vector *bufferLines;
|
|
||||||
};
|
|
||||||
|
|
||||||
void ARC_ConsoleLineBuffer_Create(ARC_ConsoleLineBuffer **buffer){
|
|
||||||
*buffer = (ARC_ConsoleLineBuffer *)malloc(sizeof(ARC_ConsoleLineBuffer));
|
|
||||||
|
|
||||||
ARC_Vector_Create(&((*buffer)->bufferLines));
|
|
||||||
|
|
||||||
//add first line to vector
|
|
||||||
ARC_Vector_Add((*buffer)->bufferLines, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ARC_ConsoleLineBuffer_Destroy(ARC_ConsoleLineBuffer *buffer){
|
|
||||||
for(uint32_t i = 0; i < ARC_Vector_Size(buffer->bufferLines); i++){
|
|
||||||
ARC_String *bufferLine = (ARC_String *)ARC_Vector_Get(buffer->bufferLines, i);
|
|
||||||
|
|
||||||
if(bufferLine != NULL){
|
|
||||||
ARC_String_Destroy(bufferLine);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ARC_Vector_Destroy(buffer->bufferLines);
|
|
||||||
free(buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ARC_ConsoleLineBuffer_Clear(ARC_ConsoleLineBuffer *buffer){
|
|
||||||
for(uint32_t i = 0; i < ARC_Vector_Size(buffer->bufferLines); i++){
|
|
||||||
ARC_String *bufferLine = (ARC_String *)ARC_Vector_Get(buffer->bufferLines, i);
|
|
||||||
|
|
||||||
if(bufferLine != NULL){
|
|
||||||
ARC_String_Destroy(bufferLine);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ARC_Vector_Destroy(buffer->bufferLines);
|
|
||||||
ARC_Vector_Create(&(buffer->bufferLines));
|
|
||||||
|
|
||||||
//add first line to vector
|
|
||||||
ARC_Vector_Add(buffer->bufferLines, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ARC_ConsoleLineBuffer_Render(ARC_ConsoleLineBuffer *buffer, ARC_ConsoleView *view){
|
|
||||||
ARC_Rect viewBounds = ARC_ConsoleView_GetBounds(view);
|
|
||||||
|
|
||||||
uint32_t bufferStartIndex = 0;
|
|
||||||
if(ARC_Vector_Size(buffer->bufferLines) > (uint32_t)viewBounds.h){
|
|
||||||
bufferStartIndex = ARC_Vector_Size(buffer->bufferLines) - viewBounds.h;
|
|
||||||
}
|
|
||||||
|
|
||||||
for(uint32_t i = 0; i < (uint32_t)viewBounds.h; i++){
|
|
||||||
if(i + bufferStartIndex > ARC_Vector_Size(buffer->bufferLines)){
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
ARC_String *bufferLine = (ARC_String *)ARC_Vector_Get(buffer->bufferLines, i + bufferStartIndex);
|
|
||||||
if(bufferLine == NULL){
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
ARC_ConsoleView_RenderStringAt(view, bufferLine, (ARC_Point){ 0, i });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ARC_ConsoleLineBuffer_RenderSection(ARC_ConsoleLineBuffer *buffer, ARC_ConsoleView *view, uint32_t startIndex, uint32_t lines){
|
|
||||||
ARC_Rect viewBounds = ARC_ConsoleView_GetBounds(view);
|
|
||||||
|
|
||||||
for(uint32_t i = 0; i < lines; i++){
|
|
||||||
if(i + startIndex >= ARC_Vector_Size(buffer->bufferLines)){
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(i >= (uint32_t)viewBounds.h){
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
ARC_String *bufferLine = (ARC_String *)ARC_Vector_Get(buffer->bufferLines, i + startIndex);
|
|
||||||
if(bufferLine == NULL){
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
ARC_ConsoleView_RenderStringAt(view, bufferLine, (ARC_Point){ 0, i });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ARC_ConsoleLineBuffer_AddChar(ARC_ConsoleLineBuffer *buffer, char character){
|
|
||||||
if(character == '\n'){
|
|
||||||
ARC_Vector_Add(buffer->bufferLines, (void *)NULL);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
//get the last line and add a char to it
|
|
||||||
ARC_String *bufferLine = (ARC_String *)ARC_Vector_Get(buffer->bufferLines, ARC_Vector_Size(buffer->bufferLines) - 1);
|
|
||||||
ARC_Vector_RemoveIndex(buffer->bufferLines, ARC_Vector_Size(buffer->bufferLines) - 1);
|
|
||||||
|
|
||||||
if(bufferLine == NULL){
|
|
||||||
ARC_String_Create(&bufferLine, &character, 1);
|
|
||||||
ARC_Vector_Add(buffer->bufferLines, (void *)bufferLine);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
//add char to the end of the bufferline
|
|
||||||
ARC_String *nextChar;
|
|
||||||
ARC_String_Create(&nextChar, &character, 1);
|
|
||||||
|
|
||||||
ARC_String *tempBufferLine = bufferLine;
|
|
||||||
ARC_String_Merge(&bufferLine, tempBufferLine, nextChar);
|
|
||||||
|
|
||||||
ARC_String_Destroy(tempBufferLine);
|
|
||||||
ARC_String_Destroy(nextChar);
|
|
||||||
|
|
||||||
//add buffer line back to the bufferLines
|
|
||||||
ARC_Vector_Add(buffer->bufferLines, (void *)bufferLine);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ARC_ConsoleLineBuffer_AddString(ARC_ConsoleLineBuffer *buffer, ARC_String *string){
|
|
||||||
//TODO: this in a more efficient way
|
|
||||||
for(uint64_t i = 0; i < string->length; i++){
|
|
||||||
ARC_ConsoleLineBuffer_AddChar(buffer, string->data[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ARC_ConsoleLineBuffer_AddCString(ARC_ConsoleLineBuffer *buffer, char *cstring, uint64_t length){
|
|
||||||
//TODO: this in a more efficient way
|
|
||||||
for(uint64_t i = 0; i < length; i++){
|
|
||||||
ARC_ConsoleLineBuffer_AddChar(buffer, cstring[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ARC_ConsoleLineBuffer_AddCStringWithStrlen(ARC_ConsoleLineBuffer *buffer, char *cstring){
|
|
||||||
//TODO: this in a more efficient way
|
|
||||||
for(uint64_t i = 0; i < strlen(cstring); i++){
|
|
||||||
ARC_ConsoleLineBuffer_AddChar(buffer, cstring[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t ARC_ConsoleLineBuffer_GetLineNumbers(ARC_ConsoleLineBuffer *buffer){
|
|
||||||
return ARC_Vector_Size(buffer->bufferLines);
|
|
||||||
}
|
|
||||||
|
|
@ -1,51 +0,0 @@
|
||||||
#include "arc/console/buffer/view.h"
|
|
||||||
|
|
||||||
#include "arc/console/view.h"
|
|
||||||
#include "arc/math/point.h"
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
struct ARC_ConsoleViewBuffer {
|
|
||||||
ARC_Point bounds;
|
|
||||||
char **buffer;
|
|
||||||
};
|
|
||||||
|
|
||||||
void ARC_ConsoleViewBuffer_Create(ARC_ConsoleViewBuffer **buffer, ARC_ConsoleView *view){
|
|
||||||
*buffer = (ARC_ConsoleViewBuffer *)malloc(sizeof(ARC_ConsoleViewBuffer));
|
|
||||||
|
|
||||||
ARC_Rect viewBounds = ARC_ConsoleView_GetBounds(view);
|
|
||||||
(*buffer)->bounds = (ARC_Point){ viewBounds.w - viewBounds.x, viewBounds.h - viewBounds.y };
|
|
||||||
|
|
||||||
//create the buffer array
|
|
||||||
(*buffer)->buffer = (char **)malloc(sizeof(char *) * (*buffer)->bounds.y);
|
|
||||||
for(int32_t y = 0; y < (*buffer)->bounds.y ; y++){
|
|
||||||
(*buffer)->buffer[y] = (char *)malloc(sizeof(char) * (*buffer)->bounds.x);
|
|
||||||
}
|
|
||||||
|
|
||||||
ARC_ConsoleViewBuffer_Clear(*buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ARC_ConsoleViewBuffer_Destroy(ARC_ConsoleViewBuffer *buffer){
|
|
||||||
for(int32_t y = 0; y < buffer->bounds.y; y++){
|
|
||||||
free(buffer->buffer[y]);
|
|
||||||
}
|
|
||||||
|
|
||||||
free(buffer->buffer);
|
|
||||||
free(buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ARC_ConsoleViewBuffer_Clear(ARC_ConsoleViewBuffer *buffer){
|
|
||||||
for(int32_t y = 0; y < buffer->bounds.y ; y++){
|
|
||||||
for(int32_t x = 0; x < buffer->bounds.x; x++){
|
|
||||||
buffer->buffer[y][x] = ' ';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ARC_ConsoleViewBuffer_Render(ARC_ConsoleViewBuffer *buffer, ARC_ConsoleView *view){
|
|
||||||
for(int32_t y = 0; y < buffer->bounds.y ; y++){
|
|
||||||
for(int32_t x = 0; x < buffer->bounds.x; x++){
|
|
||||||
ARC_ConsoleView_RenderCharAt(view, buffer->buffer[y][x], (ARC_Point){ x, y });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue