<commit_before>/*
 * This software is licensed under the terms of the MIT-License
 * See COPYING for further information. 
 * ---
 * Copyright (C) 2011, <NAME> <<EMAIL>>
 * Copyright (C) 2011, <NAME> <http://akari.thebadasschoobs.org/>
 */
 
#include "global.h"
#include "menu.h"
#include "options.h"
#include "stage.h"
#include "stageselect.h"
#include "mainmenu.h"

void backtomain(void*);

void create_stage_menu(MenuData *m) {
	char title[STGMENU_MAX_TITLE_LENGTH];
	int i;
	
	create_menu(m);
	m->type = MT_Transient;
	// TODO: I think ALL menus should use the title field, but I don't want to screw with it right now.
	m->title = "Stage Select";
	
	for(i = 0; stages[i].loop; ++i) if(!stages[i].hidden) {
		snprintf(title, STGMENU_MAX_TITLE_LENGTH, "%d. %s", i + 1, stages[i].title);
		add_menu_entry(m, title, start_story, &(stages[i]));
	}
	
	add_menu_separator(m);
	add_menu_entry(m, "Back", backtomain, m);
}

void draw_stage_menu(MenuData *m) {
	draw_options_menu_bg(m);
	draw_text(AL_Right, (stringwidth(m->title, _fonts.mainmenu) + 10) * (1-m->fade), 30, m->title, _fonts.mainmenu);
	
	glPushMatrix();
	glTranslatef(100, 100 + ((m->ecount * 20 + 140 > SCREEN_W)? min(0, SCREEN_H * 0.7 - 100 - m->drawdata[2]) : 0), 0);
	
	glPushMatrix();
	glTranslatef(SCREEN_W/2 - 100, m->drawdata[2], 0);
	glScalef(SCREEN_W - 200, 20, 1);
	glColor4f(0,0,0,0.5);
	
	draw_quad();
	glPopMatrix();
	
	int i;
	for(i = 0; i < m->ecount; i++) {
		MenuEntry *e = &(m->entries[i]);
		
		e->drawdata += 0.2 * (10*(i == m->cursor) - e->drawdata);
		float a = e->drawdata * 0.1;
		<commit_msg>got rid of the N. numeration in stageselect<commit_after>/*
 * This software is licensed under the terms of the MIT-License
 * See COPYING for further information. 
 * ---
 * Copyright (C) 2011, <NAME> <<EMAIL>>
 * Copyright (C) 2011, <NAME> <http://akari.thebadasschoobs.org/>
 */
 
#include "global.h"
#include "menu.h"
#include "options.h"
#include "stage.h"
#include "stageselect.h"
#include "mainmenu.h"

void backtomain(void*);

void create_stage_menu(MenuData *m) {
	char title[STGMENU_MAX_TITLE_LENGTH];
	int i;
	
	create_menu(m);
	m->type = MT_Transient;
	// TODO: I think ALL menus should use the title field, but I don't want to screw with it right now.
	m->title = "Stage Select";
	
	for(i = 0; stages[i].loop; ++i) if(!stages[i].hidden) {
		snprintf(title, STGMENU_MAX_TITLE_LENGTH, "%s", stages[i].title);
		add_menu_entry(m, title, start_story, &(stages[i]));
	}
	
	add_menu_separator(m);
	add_menu_entry(m, "Back", backtomain, m);
}

void draw_stage_menu(MenuData *m) {
	draw_options_menu_bg(m);
	draw_text(AL_Right, (stringwidth(m->title, _fonts.mainmenu) + 10) * (1-m->fade), 30, m->title, _fonts.mainmenu);
	
	glPushMatrix();
	glTranslatef(100, 100 + ((m->ecount * 20 + 140 > SCREEN_W)? min(0, SCREEN_H * 0.7 - 100 - m->drawdata[2]) : 0), 0);
	
	glPushMatrix();
	glTranslatef(SCREEN_W/2 - 100, m->drawdata[2], 0);
	glScalef(SCREEN_W - 200, 20, 1);
	glColor4f(0,0,0,0.5);
	
	draw_quad();
	glPopMatrix();
	
	int i;
	for(i = 0; i < m->ecount; i++) {
		MenuEntry *e = &(m->entries[i]);
		
		e->drawdata += 0.2 * (10*(i == m->cursor) - e->drawdata);
		float a = e->drawdata * 0.1;
		
{'fraction_non_alphanumeric': 0.18425196850393702, 'fraction_numerical': 0.037480314960629924, 'mean_word_length': 4.172638436482084, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 43, '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': '4516847', 'n_tokens_mistral': 1439, 'n_tokens_neox': 1292, 'n_words': 306}