<commit_before>#include <stdio.h>
#include <stdbool.h>
#include <SDL2/SDL.h>

const int SCREEN_WIDTH = 640;
const int SCREEN_HEIGHT = 480;

typedef struct player_ {
  int health;
} player;

typedef struct stats_level_ {
  int error;
} stats_level;

// "L" -- text mode
int level1 (SDL_Window* window, SDL_Surface* screenSurface, stats_level* stats_level1, player* player1, player* player2)
{
  printf("\n  You are standing in a room.");
  printf("\n\n  A sly, female voice speaks in front of you:");
  printf("\n\n    The limit of what you can do is:");
  printf("\n\n      [l]ook.");
  printf("\n\n  What do you do?");
  printf("\n\n    : ");
  char c = getchar();
  if (c == 'l')
  {
    printf("\n  As you open your eyes to look, from your left comes a terrible shriek;");
    printf("\n\n    NO! [L]EAVE!");
    printf("\n\n      Your eardrums shatter.");
    printf("\n\n        You fall to the ground.");
    printf("\n\n          You hit your head on a sharp object.");
    printf("\n\n            Still from your left, you hear a sobbing voice:");
    printf("\n\n              I didn't mean to...");
    printf("\n");
    (*player1).health = 0;
    sleep(10);
    printf("\n            You die.");
    printf("\n");
    sleep(5);
    (*stats_level1).error = EXIT_SUCCESS;
    return false;
  }
  else if (c == 'L')
  {
    printf("\n  You ignore the obviously malicious voice.");
    printf("\n\n    You leave this room.");
    printf("\n\n      Outside is nothing.");
    printf("\n\n        You leave this world");
    printf("\n");
    sleep(10);
    printf("\n          alive.");
    printf("\n");
    sleep(5);
    (*stats_level1).error = EXIT_SUCCESS;
    return true;
  }
  else
  {
    printf("\n  The voice now whips your ears:");
    printf("\n\n    MIND YOUR INPUT!");
    printf("\n");
    printf("\n      Your life force is sucked out.");
    sleep(10);
    (*player1).health = 0;
    printf("\n\n        You die.");
    printf("\n");
    sleep(5);
    (*stats_level1).error = EXIT_SUCCESS;
    return false;
  }
}

int intro (SDL_Window* window, SDL_Surface* screenSurface, stats_level* stats_intro, player* player1, player* player2)
{
  if (SDL_Init(SDL_INIT_VIDEO) < 0 )
  {
    fprintf(stderr, "SDL could not initialize! SDL_Error: %s\n", SDL_GetError());
    (*player1).health = 0;
    (*stats_intro).error = EXIT_FAILURE;
    return false;
  }

  window = SDL_CreateWindow("LIMIT -- Sonen Game Jam 2014, Team Erik", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, SCREEN_WIDTH, SCREEN_HEIGHT, SDL_WINDOW_SHOWN);
  if (window == NULL)
  {
    fprintf(stderr, "Window could not be created! SDL_Error: %s\n", SDL_GetError());
    (*player1).health = 0;<commit_msg>Had forgotten extra call to printf in one of the paths prior to sleep.<commit_after>#include <stdio.h>
#include <stdbool.h>
#include <SDL2/SDL.h>

const int SCREEN_WIDTH = 640;
const int SCREEN_HEIGHT = 480;

typedef struct player_ {
  int health;
} player;

typedef struct stats_level_ {
  int error;
} stats_level;

// "L" -- text mode
int level1 (SDL_Window* window, SDL_Surface* screenSurface, stats_level* stats_level1, player* player1, player* player2)
{
  printf("\n  You are standing in a room.");
  printf("\n\n  A sly, female voice speaks in front of you:");
  printf("\n\n    The limit of what you can do is:");
  printf("\n\n      [l]ook.");
  printf("\n\n  What do you do?");
  printf("\n\n    : ");
  char c = getchar();
  if (c == 'l')
  {
    printf("\n  As you open your eyes to look, from your left comes a terrible shriek;");
    printf("\n\n    NO! [L]EAVE!");
    printf("\n\n      Your eardrums shatter.");
    printf("\n\n        You fall to the ground.");
    printf("\n\n          You hit your head on a sharp object.");
    printf("\n\n            Still from your left, you hear a sobbing voice:");
    printf("\n\n              I didn't mean to...");
    printf("\n");
    (*player1).health = 0;
    sleep(10);
    printf("\n            You die.");
    printf("\n");
    sleep(5);
    (*stats_level1).error = EXIT_SUCCESS;
    return false;
  }
  else if (c == 'L')
  {
    printf("\n  You ignore the obviously malicious voice.");
    printf("\n\n    You leave this room.");
    printf("\n\n      Outside is nothing.");
    printf("\n\n        You leave this world");
    printf("\n");
    sleep(10);
    printf("\n          alive.");
    printf("\n");
    sleep(5);
    (*stats_level1).error = EXIT_SUCCESS;
    return true;
  }
  else
  {
    printf("\n  The voice now whips your ears:");
    printf("\n\n    MIND YOUR INPUT!");
    printf("\n");
    printf("\n      Your life force is sucked out.");
    printf("\n");
    sleep(10);
    (*player1).health = 0;
    printf("\n        You die.");
    printf("\n");
    sleep(5);
    (*stats_level1).error = EXIT_SUCCESS;
    return false;
  }
}

int intro (SDL_Window* window, SDL_Surface* screenSurface, stats_level* stats_intro, player* player1, player* player2)
{
  if (SDL_Init(SDL_INIT_VIDEO) < 0 )
  {
    fprintf(stderr, "SDL could not initialize! SDL_Error: %s\n", SDL_GetError());
    (*player1).health = 0;
    (*stats_intro).error = EXIT_FAILURE;
    return false;
  }

  window = SDL_CreateWindow("LIMIT -- Sonen Game Jam 2014, Team Erik", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, SCREEN_WIDTH, SCREEN_HEIGHT, SDL_WINDOW_SHOWN);
  if (window == NULL)
  {
    fprintf(stderr, "Window could not be created! SDL_Error: %s\n", SDL_GetError());
    (*player1).health = 0;
{'fraction_non_alphanumeric': 0.15728689275893676, 'fraction_numerical': 0.013932172318973418, 'mean_word_length': 2.701492537313433, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, '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': '1926397', 'n_tokens_mistral': 1925, 'n_tokens_neox': 1834, 'n_words': 551}