<commit_before>//
//  Video.cpp
//  Clock Signal
//
//  Created by <NAME> on 14/04/2018.
//  Copyright 2018 <NAME>. All rights reserved.
//

#include "Video.hpp"

using namespace AppleII::Video;

VideoBase::VideoBase() :
	crt_(new Outputs::CRT::CRT(910, 1, Outputs::CRT::DisplayType::NTSC60, 1)) {

	// Set a composite sampling function that assumes one byte per pixel input, and
	// accepts any non-zero value as being fully on, zero being fully off.
	crt_->set_composite_sampling_function(
		"float composite_sample(usampler2D sampler, vec2 coordinate, vec2 icoordinate, float phase, float amplitude)"
		"{"
			"return texture(sampler, coordinate).r;"
		"}");

	// Show only the centre 75% of the TV frame.
	crt_->set_video_signal(Outputs::CRT::VideoSignal::Composite);
	crt_->set_visible_area(Outputs::CRT::Rect(0.115f, 0.122f, 0.77f, 0.77f));
	crt_->set_immediate_default_phase(0.0f);
}

Outputs::CRT::CRT *VideoBase::get_crt() {
	return crt_.get();
}

/*
	Rote setters and getters.
*/
void VideoBase::set_alternative_character_set(bool alternative_character_set) {
	alternative_character_set_ = alternative_character_set;
}

bool VideoBase::get_alternative_character_set() {
	return alternative_character_set_;
}

void VideoBase::set_80_columns(bool columns_80) {
	columns_80_ = columns_80;
}
<commit_msg>Turns down the composite signal amplitude a little, to help colour distinctness.<commit_after>//
//  Video.cpp
//  Clock Signal
//
//  Created by <NAME> on 14/04/2018.
//  Copyright 2018 <NAME>. All rights reserved.
//

#include "Video.hpp"

using namespace AppleII::Video;

VideoBase::VideoBase() :
	crt_(new Outputs::CRT::CRT(910, 1, Outputs::CRT::DisplayType::NTSC60, 1)) {

	// Set a composite sampling function that assumes one byte per pixel input, and
	// accepts any non-zero value as being fully on, zero being fully off.
	crt_->set_composite_sampling_function(
		"float composite_sample(usampler2D sampler, vec2 coordinate, vec2 icoordinate, float phase, float amplitude)"
		"{"
			"return clamp(texture(sampler, coordinate).r, 0.0, 0.7);"
		"}");

	// Show only the centre 75% of the TV frame.
	crt_->set_video_signal(Outputs::CRT::VideoSignal::Composite);
	crt_->set_visible_area(Outputs::CRT::Rect(0.115f, 0.122f, 0.77f, 0.77f));
	crt_->set_immediate_default_phase(0.0f);
}

Outputs::CRT::CRT *VideoBase::get_crt() {
	return crt_.get();
}

/*
	Rote setters and getters.
*/
void VideoBase::set_alternative_character_set(bool alternative_character_set) {
	alternative_character_set_ = alternative_character_set;
}

bool VideoBase::get_alternative_character_set() {
	return alternative_character_set_;
}

void VideoBase::set_80_columns(bool columns_80) {
	columns_80_ = columns_80;
}

{'fraction_non_alphanumeric': 0.13165680473372782, 'fraction_numerical': 0.03698224852071006, 'mean_word_length': 5.247113163972286, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, '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': '2329131', 'n_tokens_mistral': 1025, 'n_tokens_neox': 925, 'n_words': 219}