<commit_before>/**
 *  UOSC
 *  The ultimate old school console.
 *
 *  @author <NAME> <<EMAIL>>
 */

#include <iostream>
#include <string>
#include <cstdint>
#include <SDL.h>

#include "graphics.h"
#include "window_properties.h"
using namespace std;

#define VERSION "0.1a"

Graphics *g_graphics = 0;

/**
 *  That old C thing.
 *
 *  @param argc Number of arguments.
 *  @param argv Array of arguments.
 *  @return Exit code.
 */
int main(int argc, char *argv[]) {
	// Setup our FPS limiting variables.
	uint32_t frame_start, frame_time;

	// Create the window title.
	string title = "The Ultimate Old School Console v";
	title += VERSION;;

	// Initialize SDL.
	g_graphics = new Graphics();
	g_graphics->g_bRunning = g_graphics->init(title.c_str(),
											  SDL_WINDOWPOS_CENTERED,
											  SDL_WINDOWPOS_CENTERED,
											  WindowProperty::width,
											  WindowProperty::height,
											  SDL_WINDOW_RESIZABLE |
											  SDL_WINDOW_SHOWN);

	// Check if the initialization was successful.
	if (!g_graphics->g_bRunning) {
		return 1;
	}

	// Render loop.
	while (g_graphics->g_bRunning) {
		frame_start = SDL_GetTicks();

		// Main loop.
		g_graphics->handle_events();
		g_graphics->update();
		g_graphics->render();

		frame_time = SDL_GetTicks() - frame_start;<commit_msg>Fullscreen is now the default, use -w to turn windowed mode on<commit_after>/**
 *  UOSC
 *  The ultimate old school console.
 *
 *  @author <NAME> <<EMAIL>>
 */

#include <iostream>
#include <string>
#include <cstdint>
#include <unistd.h>
#include <SDL.h>

#include "graphics.h"
#include "window_properties.h"
using namespace std;

#define VERSION "0.1a"

Graphics *g_graphics = 0;

/**
 *  That old C thing.
 *
 *  @param argc Number of arguments.
 *  @param argv Array of arguments.
 *  @return Exit code.
 */
int main(int argc, char *argv[]) {
	char arg;
	int fullscreen = SDL_WINDOW_FULLSCREEN;

	// Parse arguments.
	while ((arg = getopt (argc, argv, "w")) != -1) {
		switch (arg) {
		case 'w':
			// Windowed mode.
			fullscreen = 0;
			break;
		}
	}

	// Setup our FPS limiting variables.
	uint32_t frame_start, frame_time;

	// Create the window title.
	string title = "The Ultimate Old School Console v";
	title += VERSION;

	// Initialize SDL.
	g_graphics = new Graphics();
	g_graphics->g_bRunning = g_graphics->init(title.c_str(),
											  SDL_WINDOWPOS_CENTERED,
											  SDL_WINDOWPOS_CENTERED,
											  WindowProperty::width,
											  WindowProperty::height,
											  SDL_WINDOW_RESIZABLE |
											  SDL_WINDOW_SHOWN |
											  fullscreen);

	// Check if the initialization was successful.
	if (!g_graphics->g_bRunning) {
		return 1;
	}

	// Render loop.
	while (g_graphics->g_bRunning) {
		frame_start = SDL_GetTicks();

		// Main loop.
		g_graphics->handle_events();
		g_graphics->update();
		g_graphics->render();

		frame_time = SDL_GetTicks() - frame_start;
{'fraction_non_alphanumeric': 0.12633390705679862, 'fraction_numerical': 0.004819277108433735, 'mean_word_length': 3.0082758620689654, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 32, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6665322', 'n_tokens_mistral': 1195, 'n_tokens_neox': 1000, 'n_words': 260}