44 lines
1.3 KiB
C
44 lines
1.3 KiB
C
|
#include "render.h"
|
||
|
|
||
|
float render_zoom = 2.0F;
|
||
|
|
||
|
Texture2D render_texture [render_texture_count];
|
||
|
|
||
|
void render_sprite (int sprite, int x, int y, int u, int v, int width, int height) {
|
||
|
DrawTextureRec (icons, (Rectangle) { u, v, width, height }, (Vector2) { x, y }, WHITE);
|
||
|
}
|
||
|
|
||
|
void render_string (char * string, int x, int y) {
|
||
|
DrawText (text, x + 6, y + 6, 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/menu/menu.png");
|
||
|
|
||
|
SetTextureFilter (render_texture [ui], TEXTURE_FILTER_POINT);
|
||
|
|
||
|
render_texture [traits] = LoadTexture ("sprite/menu/traits.png");
|
||
|
render_texture [skills] = LoadTexture ("sprite/menu/skills.png");
|
||
|
render_texture [values] = LoadTexture ("sprite/menu/values.png");
|
||
|
render_texture [units] = LoadTexture ("sprite/menu/units.png");
|
||
|
render_texture [blocks] = LoadTexture ("sprite/menu/blocks.png");
|
||
|
|
||
|
ashlands_data = LoadTexture ("sprite/world/ashlands.png");
|
||
|
|
||
|
//~Texture2D vvv = LoadTexture ("sprite/orc/manor.png");
|
||
|
|
||
|
unit_data [orc] = LoadTexture ("sprite/orc/units.png");
|
||
|
unit_data [human] = LoadTexture ("sprite/human/units.png");
|
||
|
unit_data [elf] = LoadTexture ("sprite/elf/units.png");
|
||
|
}
|