--- /dev/null
+
+files = $(wildcard *.c) $(wildcard *.h)
+warning_options = -std=c89 -Wall -Wno-unused-label -Werror -pedantic
+windows_libraries = -lraylib -lgdi32 -lwinmm -lm
+linux_libraries = -lraylib -lGL -lm -lpthread -ldl -lrt -lX11
+
+linux: $(files)
+ gcc $(files) $(linux_libraries) $(warning_options)
+windows: $(files)
+ gcc $(files) $(windows_libraries) $(warning_options)
+
--- /dev/null
+#include "raylib.h"
+#include <stdio.h>
+
+
+/* defines */
+
+#define RENDERWIDTH 640.0
+#define RENDERHEIGHT 480.0
+#define WINDOWTITLE "Rhythm game!"
+#define FPS 30
+
+/* macros */
+#define MIN(a, b) ((a)<(b)? (a) : (b))
+
+/* functions */
+
+/* window.c : resizeable window w/letterbox */
+int setupWindow(RenderTexture2D *tar);
+int drawTexture(RenderTexture2D *tar);
+int closeWindow(RenderTexture2D *tar);
--- /dev/null
+/* Resizeable window. c89
+ * Very heavily based off of the "letterbox" example */
+#include "game.h"
+
+int setupWindow(RenderTexture2D *tar)
+{
+ SetConfigFlags(FLAG_WINDOW_RESIZABLE | FLAG_VSYNC_HINT);
+ InitWindow(RENDERWIDTH, RENDERHEIGHT, WINDOWTITLE);
+ SetTargetFPS(FPS);
+
+ *tar = LoadRenderTexture(RENDERWIDTH, RENDERHEIGHT);
+
+ return 0;
+}
+
+const Vector2 origin = {0, 0};
+
+int drawTexture(RenderTexture2D *tar)
+{
+ Rectangle srcrec, dstrec;
+ float scale;
+
+ ClearBackground(BLACK);
+
+ scale = MIN((float)GetScreenWidth()/RENDERWIDTH,
+ (float)GetScreenHeight()/RENDERHEIGHT);
+ printf("%f\n", scale);
+
+ srcrec.x = 0.0f;
+ srcrec.y = 0.0f;
+ srcrec.width = tar->texture.width;
+ srcrec.height = -tar->texture.height;
+
+ dstrec.x = (GetScreenWidth() - RENDERWIDTH*scale)*0.5f;
+ dstrec.y = (GetScreenHeight() - RENDERHEIGHT*scale)*0.5f;
+ dstrec.width = RENDERWIDTH*scale;
+ dstrec.height = RENDERHEIGHT*scale;
+
+ DrawTexturePro(
+ tar->texture,
+ srcrec,
+ dstrec,
+ origin,
+ 0.0f,
+ WHITE
+ );
+
+ return 0;
+}
+
+int closeWindow(RenderTexture2D *tar)
+{
+ UnloadRenderTexture(*tar);
+ return 0;
+}