This repo contains my custom libraries and links to some that I use.
These are for my personal use, but feel free to try them out as well.
Do note the parent-child relations of libraries. For example,
CustomSDL
requiresCustomCPP
andfreetype
.
- CustomSDL ` - has a UI class with some GUI elements. A surfaceManipulation class for quick surface editing and color retrieving.
- CustomCPP - has a few conversion functions, windows-specific functions and a few algorithms.
- Freetype.
- PyCLink - has functions to send data from a c++ application to python and vice-versa.
- CustomSDL has:
- a
UI
class. It uses freetype library to display a text field, has has abutton
class, ascrollBox
class for textures and a list of buttons, apane
class for a simple background that 'blocks clicks'. UIFLAGS allow quite a bit of customizability. - a
surfaceManipulation
class. It is useful if you want to draw to a surface multiple times, as the class creates a surface with specified parameters and you can easily call a function to draw to a specific pixel. - Outside-class functions:
onRect
function to check if cursor or given x,y coordinates are within anSDL_Rect
's area.compareRects
, self explanatory, returnstrue
if twoSDL_Rect
s are equal andfalse
if not.getSurfaceColors
returns RGBA colors of a givenSDL_Surface
's specificied pixel.blitSurface
more or less user-friendly explanation on what arguments to provide to anSDL_BlitSurface
function to merge 2SDL_Surface
s.getWindowHandle
function to get HWND to SDL created window.
- a
- CustomCPP has:
- a
upsAverage
function, which returns the number of updates in the last second. - A few conversion fuctions:
intToString
stringToInt
doubleToString
stringToDouble
charToLPWSTR
- Miscellaneous
append_char_p
- Append a character array (char*) to a given character array (char*).
- Windows specific functions:
browseFolder
function opens aBrowse for folder
window to select a path to a folder on the system.getScreenPixels
function returns a pointer array tocolor
struct of the specified area's on the screen pixel color values.windowIgnoreColor
function makes a window completely ignore a specified color, effectively making that area transparent.
- Algorithms
Mergesort
.
- a
- PyCLink:
-
It is not finished.
direct_cpp-py_link
is currently the latest version and can only exchangechar*
type info.In short how to use it (parameters explained in header/module files): Write a python script that calls
receiveInput
to receive input from c++ ( not required ). Before python closes, to send a string back, callsend
function. The C++ application shoud callcommunicate
function to start the python executable and wait for it to close.
-
Links to useful libraries I use.