#ifndef ctx_h #define ctx_h #include "input.h" #include "window.h" #include "prbs.h" struct prge_context { i32 stop; struct arena pers; struct arena temp; struct input in; i32 width, height; /* struct sound sounds[max_sounds_loaded]; struct sound_node sound_nodes[max_sounds_playing]; struct sound_queue queue; */ /* struct elist entities; */ struct string basedir; }; struct prge_context init_prge(i32 width, i32 height); /* texture_t prge_load_texture(prge_context_t *ctx, const char *filename, i32 gamma) { char full_path[MAX_PATH]; snprintf(full_path, sizeof(full_path), "%s/%s", ctx->dir, filename); texture_t texture = load_texture(&ctx->arena, full_path, gamma); return texture; } model_t prge_load_model(prge_context_t *ctx, transform_t transform, const char *filename) { char full_path[MAX_PATH]; snprintf(full_path, sizeof(full_path), "%s/%s", ctx->dir, filename); model_t model = load_model_obj(&ctx->arena, transform, full_path); return model; } i32 prge_load_sound_vorbis(prge_context_t *ctx, const char *filename) { char full_path[MAX_PATH]; snprintf(full_path, sizeof(full_path), "%s/%s", ctx->dir, filename); return load_vorbis(&ctx->arena, ctx->sounds, full_path); } void prge_play_sound(prge_context_t *ctx, i32 id) { play_sound(ctx->sounds, &ctx->sound_queue, ctx->sound_queue_nodes, id); } */ #endif