Prepare for event system
Moved stuff around. Create an entry point for RSE. Created base for events module Signed-off-by: Piotr Krygier <piotrkrygier@everyonecancode@xyz>
This commit is contained in:
@@ -1,33 +1,15 @@
|
||||
#include <SDL3/SDL_init.h>
|
||||
#include <SDL3/SDL_log.h>
|
||||
#include "graphics/rse_graphics.h"
|
||||
#include "utilities/errors_common.h"
|
||||
#include "SDL3/SDL_thread.h"
|
||||
#include "utilities/time_utils.h"
|
||||
|
||||
#include "red_scarf_engine.h"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
rse_err_t status = RSE_ERROR_NO_ERROR;
|
||||
struct rse_graphics_context_t* context = NULL;
|
||||
SDL_Thread* graphics_task = NULL;
|
||||
rse_context context;
|
||||
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
||||
SDL_SetLogPriorities(SDL_LOG_PRIORITY_VERBOSE);
|
||||
|
||||
STATUS_CHECK(time_init());
|
||||
STATUS_CHECK(rse_graphics_init(&context));
|
||||
STATUS_CHECK(rse_graphics_test_function(context));
|
||||
|
||||
graphics_task = SDL_CreateThread(rse_graphics_run, "graphics_task", (void*) context);
|
||||
|
||||
if (NULL == graphics_task) {
|
||||
SDL_LogCritical(SDL_LOG_CATEGORY_GPU, "Failed to create graphics task");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
SDL_WaitThread(graphics_task, NULL);
|
||||
STATUS_CHECK(rse_init(&context));
|
||||
STATUS_CHECK(rse_run(context));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user