umorna/source/main.c

57 lines
1.4 KiB
C
Raw Normal View History

#include "game.h"
#include "render.h"
#include "engine.h"
#include "menu.h"
int main (void) {
game_configure ();
render_configure ();
menu_configure ();
while (! WindowShouldClose ()) {
2023-12-21 23:08:09 -05:00
Color tint = { 0, 0, 0, 0 };
BeginDrawing ();
2023-12-21 23:08:09 -05:00
ClearBackground (tint);
view_map ();
2023-12-21 23:08:09 -05:00
view_base_1 (0, 32, 128);
view_base_1 (1, 32, 512);
view_base_2 (0, 1024, 128);
view_base_2 (1, 1024, 512);
/*
for (int i = 0; i < 18; ++i) {
view_unit (orc, i, 900 + 32 * i, 32);
view_unit (human, i, 900 + 32 * i, 64);
view_unit (elf, i, 900 + 32 * i, 96);
}
*/
2023-12-21 20:19:30 -05:00
if (IsKeyPressed (KEY_RIGHT)) { menu_show [menu_traits] = menu_show [menu_traits] ? 0 : 1; }
if (IsKeyPressed (KEY_LEFT)) { menu_show [menu_skills] = menu_show [menu_skills] ? 0 : 1; }
if (IsKeyPressed (KEY_DOWN)) { menu_show [menu_values] = menu_show [menu_values] ? 0 : 1; }
2023-12-20 10:24:43 -05:00
2023-12-21 23:08:09 -05:00
view_hud (0, SIDE_SIZE, render_height (), render_width () - SIDE_SIZE, 0);
view_hud (1, render_width () - SIDE_SIZE, render_height (), 0, 0);
view_neon_menu (menu_resources, 1, 0, 0);
2023-12-21 20:19:30 -05:00
view_neon_menu (menu_traits, 1, 0, 0);
view_neon_menu (menu_skills, 1, 0, 0);
view_neon_menu (menu_values, 1, 0, 0);
2023-12-21 23:08:09 -05:00
/*
Rectangle source = { 0, 0, BASE_SIZE * 15, BASE_SIZE * 10 };
Rectangle destination = { 128, 128, BASE_SIZE * 15 * zoom, BASE_SIZE * 10 * zoom };
2023-12-21 23:08:09 -05:00
DrawTexturePro (vvv, source, destination, (Vector2) { 0, 0 }, 0.0F, WHITE);
*/
EndDrawing ();
}
return (0);
}