107void General_MakeFileSizeReadable(
unsigned long size_in_bytes,
char* formatted_file_size);
158int16_t
General_Strncmp(
const char* string_1,
const char* string_2,
size_t max_len);
193bool General_PointInRect(int16_t x, int16_t y,
Rectangle r);
197void General_CenterRectWithinRect(
Rectangle* the_frame_rect,
Rectangle* the_hero_rect,
bool at_25_percent_v);
243void General_CreateFilePathFromFolderAndFile(
char* the_combined_path,
char* the_folder_path,
char* the_file_name);
290char General_GetChar(
void);
306uint16_t General_GetRandom(uint16_t the_range);
int16_t General_Strnlen(const char *the_string, size_t max_len)
Measure the length of a fixed-size string Safe(r) strlen function: will stop processing if no termina...
Definition: general.c:460
bool General_ExtractCoreFilename(const char *the_file_name, char *the_core_part)
Extract core part of the file name, not including the extension.
Definition: general.c:939
bool General_CalculateRectIntersection(Rectangle *r1, Rectangle *r2, Rectangle *intersect_r)
Calculate the intersection between 2 rectangles, storing result in the 3rd rect passed.
Definition: general.c:728
uint8_t General_ToLower(uint8_t the_char)
Change the case of the passed character from upper to lower (if necessary) Scope is limited to charac...
Definition: general.c:296
bool General_RectWithinRect(Rectangle r1, Rectangle r2)
Test if one rectangle is entirely within the bounds of another Rectangle.
Definition: general.c:513
int16_t General_Strlcpy(char *dst, const char *src, size_t max_len)
Copies up to max_len - 1 characters from the NUL-terminated string src to dst, NUL-terminating the re...
Definition: general.c:343
int16_t General_Strncasecmp(const char *string_1, const char *string_2, size_t max_len)
Makes a case insensitive comparison of the specified number of characters of the two passed strings S...
Definition: general.c:430
int32_t General_Round(double the_float)
Round a float to the nearest integer value THINK C's and SAS/C's math.h don't include round() from: h...
Definition: general.c:140
char * General_PathPart(const char *the_file_path)
Returns a pointer to the end of the next-to-last component of a path.
Definition: general.c:881
int16_t General_CalculateRectDifference(Rectangle *r1, Rectangle *r2, Rectangle *diff_r1, Rectangle *diff_r2, Rectangle *diff_r3, Rectangle *diff_r4)
Calculate the difference between 2 rectangles and populate 0, 1, 2, 3, or 4 new rectangles with the d...
Definition: general.c:635
void General_DelayTicks(int32_t ticks)
Wait for the specified number of ticks before returning In multi-tasking ever becomes a thing,...
Definition: general.c:971
char * General_StrlcpyWithAlloc(const char *src, size_t max_len)
Allocates memory for a new string and copies up to max_len - 1 characters from the NUL-terminated str...
Definition: general.c:311
int16_t General_Strncmp(const char *string_1, const char *string_2, size_t max_len)
Makes a case sensitive comparison of the specified number of characters of the two passed strings Sto...
Definition: general.c:406
bool General_ExtractFileExtensionFromFilename(const char *the_file_name, char *the_extension)
Extract file extension into the passed char pointer, as new lowercased string pointer,...
Definition: general.c:907
bool General_StrToLower(char *the_string)
Convert a string, in place, to lower case This overwrites the string with a lower case version of its...
Definition: general.c:269
uint32_t General_ByteSwapLong(uint32_t long_needing_swap)
Swap bytes big endian <> little endian, for a long NOTE: for a word, see BSWAP() macro.
Definition: general.c:1024
int16_t General_Strlcat(char *dst, const char *src, size_t max_len)
Copies up to max_len - 1 characters from the NUL-terminated string src and appends to the end of dst,...
Definition: general.c:371
void General_DelaySeconds(uint16_t seconds)
Wait for the specified number of seconds before returning In multi-tasking ever becomes a thing,...
Definition: general.c:985
void General_CopyRect(Rectangle *r1, Rectangle *r2)
Copy values of one rect to another.
Definition: general.c:616
char * General_NamePart(const char *the_file_path)
return the first char of the last part of a file path if no path part detected, returns the original ...
Definition: general.c:862
Definition: a2560k.h:1369