#include <stddef.h>
#include <raylib.h>
#include <stdlib.h>
+
+#if POSIX_BC==1
#define RAYMATH_IMPLEMENTATION
+#endif
#include <raymath.h>
#include "structs.h"
float orb_intensity = 1.0f; /* TODO: normalized distance from center, but lighting shader already has this. */
Vector3 orb_directionality = {1.0f, 1.0f, 1.0f};
+int map_visible = 0;
+
typedef void(*renderfunc)();
typedef void(*controlfunc)();
#define MAX_RENDERFUNCS 2U
DrawTextureEx(hand_01_texture, hand_position, hand_rotation, hand_scale, orb_color);
-#define DEBUG_GAME_INFO 0
-#if DEBUG_GAME_INFO==1
Rectangle minimap_dest = {.width = 64.0f*img_export_scale.x, .height = 64.0f*img_export_scale.y, .x = 0.0f, .y = 0.0f};
Rectangle minimap_src = {.width = barrow_texture.width, .height = barrow_texture.height, .x = 0.0f, .y = 0.0f};
+ if(map_visible)
+ {
+ DrawTexturePro(floor_texture, minimap_src, minimap_dest, (Vector2){0.0f, 0.0f}, 0.0f, RAYWHITE);
+ }
+
+#define DEBUG_GAME_INFO 0
+#if DEBUG_GAME_INFO==1
- DrawTexturePro(floor_texture, minimap_src, minimap_dest, (Vector2){0.0f, 0.0f}, 0.0f, RAYWHITE);
DrawFPS(fscreen_dims.x - 80, 10);
+ DrawTexturePro(floor_texture, minimap_src, minimap_dest, (Vector2){0.0f, 0.0f}, 0.0f, RAYWHITE);
DrawText(TextFormat("cam x %f\ncam y %f\ncam z %f", cam.position.x, cam.position.y, cam.position.z), 0, 128, 16, GREEN);
DrawText(TextFormat("tgt x %f\ntgt y %f\ntgt z %f", cam.target.x, cam.target.y, cam.target.z), 0, 128+64, 16, GREEN);
DrawText(TextFormat("rot x %f\nrot y %f\nrot z %f", player_angles.x, player_angles.y, player_angles.z), 0, 128+(64*2), 16, GREEN);
{
static int status_phase = 0;
const char format_string[] = "%s\n\n%3.2f%%";
+ const char tribute_string[] = "This game is dedicated to the North American Muskrat, Ondatra Zibethicus";
const char wait_string[] = "Generating resources...";
const int sector_speed = 2U;
const int sector_segments = 16;
(status_phase % 360),
((status_phase % 360)*2),
sector_segments, LIGHTGRAY);
+
+ DrawText(tribute_string,
+ (fscreen_dims.x/2.0f) - (MeasureText(tribute_string, font_size)/2.0f), 3.0f * (fscreen_dims.y/4.0f), font_size, BLACK);
}
void control_game_mode()
cam.target.y -= DEG2RAD * 20.0;
}
+ if (IsKeyDown(KEY_M))
+ {
+ map_visible = 1;
+ }
+ else
+ {
+ map_visible = 0;
+ }
+
if (IsKeyReleased(KEY_ONE))
orb_color = RED;
if (IsKeyReleased(KEY_TWO))