#include "render.h" Texture2D render_texture [render_texture_count]; int render_width (void) { return (GetScreenWidth ()); } int render_height (void) { return (GetScreenHeight ()); } void render_sprite (int sprite, int x, int y, int u, int v, int width, int height) { Rectangle source = { u, v, width, height }; Rectangle destination = { x, y, width, height }; Vector2 origin = { 0, 0 }; DrawTexturePro (render_texture [sprite], source, destination, origin, 0.0, WHITE); } void render_string (char * string, int x, int y) { DrawText (string, x + 4, y + 4, FONT_SIZE, WHITE); } static void render_clean_up (void) { CloseWindow (); } void render_configure (void) { InitWindow (1800, 900, "EAX"); SetExitKey (KEY_ESCAPE); SetTargetFPS (60); atexit (render_clean_up); render_texture [ui] = LoadTexture ("sprite/ui.png"); SetTextureFilter (render_texture [ui], TEXTURE_FILTER_POINT); render_texture [traits] = LoadTexture ("sprite/traits.png"); render_texture [skills] = LoadTexture ("sprite/skills.png"); render_texture [values] = LoadTexture ("sprite/values.png"); render_texture [orcs] = LoadTexture ("sprite/orcs.png"); render_texture [humans] = LoadTexture ("sprite/humans.png"); render_texture [elves] = LoadTexture ("sprite/elves.png"); render_texture [ashlands] = LoadTexture ("sprite/ashlands.png"); }