<commit_before>/*
 * colour.cpp
 *
 *  Created on: 9/10/2013
 *      Author: drb
 */

#include "colour.h"

namespace etc {

SDL_Color toColour (Colour colour)
{
    SDL_Color out;
    switch (colour) {
        case(COLOUR_BLACK):
            out.r = 0; out.b = 0; out.g = 0;
            break;
        case (COLOUR_WHITE):
            out.r = 255; out.b = 255; out.g = 255;
            break;
        case (COLOUR_BLUE):
            out.r = 0; out.b = 255; out.g = 0;
            break;
        case (COLOUR_GREEN):
            out.r = 0; out.b = 0; out.g = 255;
            break;
        case (COLOUR_RED):
            out.r = 255; out.b = 0; out.g = 0;
            break;

    }
    return out;
}

SDL_Color toColour (Uint8 r , Uint8 g , Uint8 b , Uint8 a )
{
    SDL_Color out;
    out.r = r;
    out.g = g;
    out.b = b;
    out.a = a;
    return out;

}

} /* namespace etc */<commit_msg>Alpha Colours + Added alpha to COLOUR_*<commit_after>/*
 * colour.cpp
 *
 *  Created on: 9/10/2013
 *      Author: drb
 */

#include "colour.h"

namespace etc {

SDL_Color toColour (Colour colour)
{
    SDL_Color out;
    switch (colour) {
        case(COLOUR_BLACK):
            out.r = 0; out.b = 0; out.g = 0; out.a = 255;
            break;
        case (COLOUR_WHITE):
            out.r = 255; out.b = 255; out.g = 255; out.a = 255;
            break;
        case (COLOUR_BLUE):
            out.r = 0; out.b = 255; out.g = 0; out.a = 255;
            break;
        case (COLOUR_GREEN):
            out.r = 0; out.b = 0; out.g = 255; out.a = 255;
            break;
        case (COLOUR_RED):
            out.r = 255; out.b = 0; out.g = 0; out.a = 255;
            break;

    }
    return out;
}

SDL_Color toColour (Uint8 r , Uint8 g , Uint8 b , Uint8 a )
{
    SDL_Color out;
    out.r = r;
    out.g = g;
    out.b = b;
    out.a = a;
    return out;

}

} /* namespace etc */
{'fraction_non_alphanumeric': 0.13875598086124402, 'fraction_numerical': 0.04837852206273259, 'mean_word_length': 1.447334200260078, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4959983', 'n_tokens_mistral': 829, 'n_tokens_neox': 723, 'n_words': 193}