<commit_before>/* 
   Ported to DirectFB by <NAME> <<EMAIL>>

   Written by <NAME> <<EMAIL>>
*/
   
#include <stdio.h>
#include <math.h>

#include <directfb.h>

#include "matrix.h"
#include "skull.h"


IDirectFB            *dfb;
IDirectFBSurface     *primary;
IDirectFBInputDevice *keyboard;
IDirectFBInputDevice *mouse;
IDirectFBInputBuffer *mouse_buffer;


Bool	BackfaceCull = True;
Bool	DoubleBuffer = True;
Bool	Lighting = True;
int	PrimitiveType = FLAT_SHADED;
float	ScaleFactor = 1.0;

unsigned int Width, Height;

Vertex Light = {0.0, 0.0, 1.0};


static Tri3D Triangles[SKULL_TRIANGLES];
static Vertex TransformedVerticies[SKULL_VERTICIES];


static void ClearBuffer (void)
{
  primary->SetColor (primary, 0, 0, 0, 0);
  primary->FillRectangle (primary, 0, 0, Width, Height);
}

static void DrawTriangle (float color, Tri3D* tri)
{
  __u8 gray = (__u8)(color * 255.0);
  int X, Y;

  X = Width >> 1;
  Y = Height >> 1;

  primary->SetColor (primary, gray, gray, gray, 0xff);
    
  switch (PrimitiveType)
    {
    case FLAT_SHADED:<commit_msg>golden skull ;)<commit_after>/* 
   Ported to DirectFB by <NAME> <<EMAIL>>

   Written by <NAME> <<EMAIL>>
*/
   
#include <stdio.h>
#include <math.h>

#include <directfb.h>

#include "matrix.h"
#include "skull.h"


IDirectFB            *dfb;
IDirectFBSurface     *primary;
IDirectFBInputDevice *keyboard;
IDirectFBInputDevice *mouse;
IDirectFBInputBuffer *mouse_buffer;


Bool	BackfaceCull = True;
Bool	DoubleBuffer = True;
Bool	Lighting = True;
int	PrimitiveType = FLAT_SHADED;
float	ScaleFactor = 1.0;

unsigned int Width, Height;

Vertex Light = {0.0, 0.0, 1.0};


static Tri3D Triangles[SKULL_TRIANGLES];
static Vertex TransformedVerticies[SKULL_VERTICIES];


static void ClearBuffer (void)
{
  primary->SetColor (primary, 0, 0, 0, 0);
  primary->FillRectangle (primary, 0, 0, Width, Height);
}

static void DrawTriangle (float color, Tri3D* tri)
{
  __u8 gray = (__u8)(color * 255.0);
  int X, Y;

  X = Width >> 1;
  Y = Height >> 1;

  primary->SetColor (primary, gray, (gray*gray)/255, gray/4, 0xff);
    
  switch (PrimitiveType)
    {
    case FLAT_SHADED:
{'fraction_non_alphanumeric': 0.13072203869749882, 'fraction_numerical': 0.025483718735252476, 'mean_word_length': 4.011820330969267, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 35, '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': '5696416', 'n_tokens_mistral': 852, 'n_tokens_neox': 794, 'n_words': 215}