Changed to rendering system, might switch to SDL2 or OpenGL.

This commit is contained in:
Ognjen Milan Robovic 2023-12-25 10:02:40 -05:00
parent f0ac14413e
commit e2e212dcf6
2 changed files with 21 additions and 13 deletions

View File

@ -1,5 +1,8 @@
#include "render.h"
#include <stdlib.h>
#include <raylib.h>
float render_zoom = 2.0;
static Texture2D render_texture [render_texture_count];
@ -55,13 +58,20 @@ void render_configure (void) {
SetTextureFilter (render_texture [neonui], TEXTURE_FILTER_POINT);
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");
render_texture [base_1] = LoadTexture ("sprite/base_1.png");
render_texture [base_2] = LoadTexture ("sprite/base_2.png");
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");
render_texture [base_1] = LoadTexture ("sprite/base_1.png");
render_texture [base_2] = LoadTexture ("sprite/base_2.png");
render_texture [model_1_1] = LoadTexture ("sprite/model_1_1.png");
render_texture [model_1_2] = LoadTexture ("sprite/model_1_2.png");
render_texture [model_2_1] = LoadTexture ("sprite/model_2_1.png");
render_texture [model_2_2] = LoadTexture ("sprite/model_2_2.png");
render_texture [model_2_4] = LoadTexture ("sprite/model_2_4.png");
render_texture [model_3_2] = LoadTexture ("sprite/model_3_2.png");
render_texture [model_4_5] = LoadTexture ("sprite/model_4_5.png");
}

View File

@ -1,9 +1,6 @@
#ifndef UMORNA_RENDER
#define UMORNA_RENDER
#include <stdlib.h>
#include <raylib.h>
#define BASE_SIZE ( 16)
#define ICON_SIZE ( 32)
#define FONT_SIZE ( 24)
@ -12,7 +9,8 @@
enum {
neonui,
ui, traits, skills, values, orcs, humans, elves, ashlands,
base_1, base_2,
base_1, base_2, model_1_1, model_1_2, model_2_1, model_2_2, model_2_4, model_3_2,
model_4_5,
render_texture_count
};