summaryrefslogtreecommitdiff
path: root/core
AgeCommit message (Collapse)Author
2025-03-20core: init: remove hot reload supportDanny Holman
Remove hot code reloading support from the core API. This functionality is not achievable under current conditions and does not align with project goals. Signed-off-by: Danny Holman <dholman@gymli.org>
2025-03-20core: logging: make terminal settings configurableDanny Holman
Make the settings of the log output configurable. Both the color output and the output of debug messages should be togglable at runtime. Signed-off-by: Danny Holman <dholman@gymli.org>
2025-03-20core: refactor core API to be in proper styleDanny Holman
Bring the rest of the core API to be in line with the project coding style. This commit also makes the coding style change formal by updating the coding style document in the documentation. Signed-off-by: Danny Holman <dholman@gymli.org>
2025-03-20core: alloc: make the mem_block type opaqueDanny Holman
Make the mem_block struct into a fully opaque type. This brings the allocation manager in line with project coding style. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-11-19core: thread objects should be replaced with listsDanny Holman
Replace the thread and mutex handles in the thread API with list_heads. This will prevent a possible NULL pointer exception and make the code more readable. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-11-19core: add an exit code listDanny Holman
Add a header file that lists common exit codes and use them in the abort function. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-11-07core: add stack smashing protection and Win32 btDanny Holman
Add basic stack smashing protections and enable it for all engine functions. Add proper backtrace support to the Windows build. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-10-29build: use lib name in version macrosDanny Holman
Use the library name in version define macros. This should prevent collisions when using the engine alongside other libraries, as the VERSION keyword is likely very common. In addition, create three new macros for the major, minor and patch numbers separately. This allows the engine to use only the part it needs, when it needs it. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-10-25core: rune_init should only call subsystem initsDanny Holman
The main engine initialization function should only call up background subsystem init functions. No window or rendering context should be created inside this function. Likewise, the cleanup function calls should be removed from rune_exit. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-10-25core: ANSI colors need additional setup on WindowsDanny Holman
The ANSI color codes require additional setup when running under Win32. The logging API should reflect that. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-10-25core: call the system exit function when abortingDanny Holman
During an abort procedure, the system's exit function should be called to terminate the running application. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-10-14core: thread: make helper functions staticDanny Holman
Make the helper functions for the thread API static so that they aren't usable outside the thread API's translation unit. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-10-14core: alloc: move mem_block alloc to helper funcDanny Holman
Move the logic that allocates and frees individual mem_block structs to their own helper functions. This should simplify the engine's memory API and fix a bug in rune_calloc that improperly allocated a mem_block. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-10-14core: mod: create a mod interfaceDanny Holman
Create a skeleton mod interface so that the engine can load shared libraries or DLLs as in-game mods. The API should be compiler agnostic as much as possible. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-10-07core: alloc: fix a bug in reallocDanny Holman
Fix a bug in realloc that wouldn't copy the data from the original pointer. The new implementation now copies the data and marks the old block as free, as well as returning a new block if the ptr argument is NULL. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-10-03core: thread: wrap the pthreads APIDanny Holman
Create wrapper functions over the pthread API so that the engine only has to provide an integer ID for threads and mutexes. The thread and mutex handles should be handled internally so that the end user never sees the underlying datatypes. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-10-02core: logging: make color output optionalDanny Holman
Add functions that toggle color output from the logging framework. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-09-30core: callbacks: make error_callback use log_outputDanny Holman
Make the error_callback function use log_output rather than vanilla printf. This unifies the engine's logging features into a single API. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-09-30core: abort: disable stack tracing on WindowsDanny Holman
Because the C runtime on Windows doesn't support the backtrace or backtrace_symbols functions. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-09-18core: logging: print errors and warnings in colorDanny Holman
Print warnings and errors in yellow and red respectively. This will make these messages stand out and make it easier for a developer to find them in the terminal window. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-09-17core: add several new filesDanny Holman
Add several new files to the core subsystem. These files will be the basic building blocks upon which the rest of the engine will sit atop of. These files will be present in all builds, including headless and platform builds. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-09-15build: break the engine into its subsystemsv0.60Danny Holman
Break the source code into various subsystem directories. This allows certain subsystems to be disabled at compile time, if needed. Move the build system from raw Makefiles to a CMake generator. This drastically simplifies the build and requires only editing a single file, rather than the several make.config files in subsystem directories. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-08-30Makefile: retool the build systemv0.55Danny Holman
Retool the build system to be more modular and more flexible. Move all subsystems into separate directories and create make.config files that will conditionally compile based on information from the root Makefile. Signed-off-by: Danny Holman <dholman@gymli.org>
2024-08-25core: refactor entire project rootDanny Holman
Reorganize the project root such that each subsystem is placed into its own subdirectory. This allows the build system to select which subsystems to enable for a particular build. Signed-off-by: Danny Holman <dholman@gymli.org>