fixed compiling for no backend selected

This commit is contained in:
herbglitch 2025-03-27 23:43:17 -06:00
parent 4c980d8690
commit fc48793109
6 changed files with 79 additions and 28 deletions

View file

@ -9,8 +9,7 @@ extern "C" {
#include "arc/std/parser.h"
/**
* @brief the config type for archeus, loads in a config file which syntax is specified in the documentation
* @TODO: add documentation link here
* @brief the config type for archeus, loads in a .chemical file which syntax is specified in the documentation
*/
typedef struct ARC_Config ARC_Config;
@ -169,17 +168,30 @@ void *ARC_Config_Get(ARC_Config *config, ARC_String *name);
void *ARC_Config_GetWithCStr(ARC_Config *config, const char *name);
/**
* @brief TODO: write this
* @brief takes a given string and loads it into the config
*
* @breif config the config to load the string to
* @breif string the string to load into the config
*/
void ARC_Config_LoadFromString(ARC_Config *config, ARC_String **string);
/**
* @brief TODO: write this
* @brief takes a given file path and loads it into the config
*
* @note this path will be based on wherever the executable is run from
*
* @breif config the config to load the file to
* @breif path the location of the .chemical file to load
*/
void ARC_Config_LoadFromFile(ARC_Config *config, ARC_String *path);
/**
* @brief TODO: write this
* @brief takes a given file path and loads it into the config
*
* @note this path will be based on wherever the executable is run from
*
* @breif config the config to load the file to
* @breif path the location of the .chemical file to load
*/
void ARC_Config_LoadFromFileWithCStr(ARC_Config *config, const char *path);

View file

@ -3,8 +3,8 @@
#include "arc/graphics/circle.h"
#include <stdio.h>
void ARC_Circle_Render(ARC_Circle *circle, ARC_Renderer *renderer, ARC_Color *color){
void ARC_Circle_Render(ARC_Circle circle, ARC_Renderer *renderer, ARC_Color color){
printf("No Graphics Backend Selected\n");
}
#endif // !ARC_NONE_GRAPHICS
#endif // !ARC_NONE_GRAPHICS

View file

@ -3,8 +3,8 @@
#include "arc/graphics/line.h"
#include <stdio.h>
void ARC_Line_Render(int32_t *x1, int32_t *y1, int32_t *x2, int32_t *y2, ARC_Renderer *renderer, ARC_Color *color){
void ARC_Line_Render(ARC_Point point1, ARC_Point point2, ARC_Renderer *renderer, ARC_Color color){
printf("No Graphics Backend Selected\n");
}
#endif // !ARC_NONE_GRAPHICS
#endif // !ARC_NONE_GRAPHICS

View file

@ -3,7 +3,8 @@
#include "arc/graphics/sprite.h"
#include <stdio.h>
void ARC_Sprite_Create(ARC_Sprite **sprite, ARC_Spritesheet *spritesheet, ARC_Array *frames){
void ARC_Sprite_Create(ARC_Sprite **sprite, ARC_Spritesheet *spritesheet, ARC_Array frames){
*sprite = NULL;
printf("No Graphics Backend Selected\n");
}
@ -15,19 +16,11 @@ void ARC_Sprite_Copy(ARC_Sprite **newSprite, ARC_Sprite *oldSprite){
printf("No Graphics Backend Selected\n");
}
void ARC_Sprite_Render(ARC_Sprite *sprite, ARC_Renderer *renderer, ARC_Rect *renderBounds){
void ARC_Sprite_Render(ARC_Sprite *sprite, ARC_Renderer *renderer, ARC_FRect renderBounds){
printf("No Graphics Backend Selected\n");
}
void ARC_Sprite_RenderFlip(ARC_Sprite *sprite, ARC_Renderer *renderer, ARC_Rect *renderBounds, enum ARC_Sprite_Axis axis){
printf("No Graphics Backend Selected\n");
}
void ARC_Sprite_RenderRotated(ARC_Sprite *sprite, ARC_Renderer *renderer, ARC_Rect *renderBounds, ARC_Point *center, double angle){
printf("No Graphics Backend Selected\n");
}
void ARC_Sprite_SetFrameIndex(ARC_Sprite *sprite, uint32_t index){
void ARC_Sprite_RenderAt(ARC_Sprite *sprite, ARC_Renderer *renderer, ARC_FPoint point, double scale){
printf("No Graphics Backend Selected\n");
}
@ -35,14 +28,43 @@ void ARC_Sprite_IterateFrame(ARC_Sprite *sprite){
printf("No Graphics Backend Selected\n");
}
ARC_Rect *ARC_Sprite_GetBounds(ARC_Sprite *sprite){
void ARC_Sprite_AnimateFrame(ARC_Sprite *sprite, float deltatime){
printf("No Graphics Backend Selected\n");
}
void ARC_Sprite_SetFrameIndex(ARC_Sprite *sprite, uint32_t index){
printf("No Graphics Backend Selected\n");
}
void ARC_Sprite_SetAngle(ARC_Sprite *sprite, double angle){
printf("No Graphics Backend Selected\n");
}
void ARC_Sprite_SetOrigin(ARC_Sprite *sprite, ARC_FPoint origin){
printf("No Graphics Backend Selected\n");
}
void ARC_Sprite_SetOpacity(ARC_Sprite *sprite, float opacity){
printf("No Graphics Backend Selected\n");
}
void ARC_Sprite_SetFrameRate(ARC_Sprite *sprite, float rate){
printf("No Graphics Backend Selected\n");
}
uint32_t ARC_Sprite_GetFrameIndex(ARC_Sprite *sprite){
printf("No Graphics Backend Selected\n");
return ~(uint32_t)0;
}
ARC_FRect *ARC_Sprite_GetBounds(ARC_Sprite *sprite){
printf("No Graphics Backend Selected\n");
return NULL;
}
ARC_Array *ARC_Sprite_GetAllBounds(ARC_Sprite *sprite){
ARC_Array ARC_Sprite_GetAllBounds(ARC_Sprite *sprite){
printf("No Graphics Backend Selected\n");
return NULL;
return (ARC_Array){ 0, NULL };
}
#endif // !ARC_NONE_GRAPHICS
#endif // !ARC_NONE_GRAPHICS

View file

@ -4,7 +4,24 @@
#include "arc/math/point.h"
#include <stdio.h>
void ARC_Spritesheet_RenderArea(ARC_Spritesheet *spritesheet, ARC_Rect *sheetBounds, ARC_Renderer *renderer, ARC_Rect *renderBounds){
void ARC_Spritesheet_CreateFromFile(ARC_Spritesheet **spritesheet, ARC_Renderer *renderer, ARC_String *path){
*spritesheet = NULL;
printf("No Graphics Backend Selected\n");
}
void ARC_Spritesheet_Destroy(ARC_Spritesheet *spritesheet){
printf("No Graphics Backend Selected\n");
}
void ARC_Spritesheet_Render(ARC_Spritesheet *spritesheet, ARC_Renderer *renderer, ARC_FRect renderBounds){
printf("No Graphics Backend Selected\n");
}
void ARC_Spritesheet_RenderArea(ARC_Spritesheet *spritesheet, ARC_Rect sheetBounds, ARC_Renderer *renderer, ARC_FRect renderBounds){
printf("No Graphics Backend Selected\n");
}
void ARC_Spritesheet_RenderTile(ARC_Spritesheet *spritesheet, ARC_Point tilePosition, ARC_Renderer *renderer, ARC_FRect renderBounds){
printf("No Graphics Backend Selected\n");
}
@ -13,9 +30,9 @@ ARC_Point ARC_Spritesheet_GetSize(ARC_Spritesheet *spritesheet){
return (ARC_Point){ 0, 0 };
}
uint32_t *ARC_Spritesheet_GetTileSize(ARC_Spritesheet *spritesheet){
uint32_t ARC_Spritesheet_GetTileSize(ARC_Spritesheet *spritesheet){
printf("No Graphics Backend Selected\n");
return NULL;
return ~(uint32_t)0;
}
#endif // !ARC_NONE_GRAPHICS

View file

@ -19,7 +19,7 @@ void ARC_Mouse_Update(ARC_Mouse *mouse){
printf("No Input Backend Selected\n");
}
ARC_Point *ARC_Mouse_GetCoords(ARC_Mouse *mouse){
ARC_FPoint *ARC_Mouse_GetCoords(ARC_Mouse *mouse){
printf("No Input Backend Selected\n");
return NULL;
}