<commit_before>// FaceRecord.h

#ifndef __FLT_FACE_RECORD_H
#define __FLT_FACE_RECORD_H


#include "opcodes.h"
#include "Record.h"
#include "RecordVisitor.h"


namespace flt {



////////////////////////////////////////////////////////////////////
//
//                          FaceRecord
//
////////////////////////////////////////////////////////////////////


struct SFace
{
    SRecHeader    RecHeader;
    char    szIdent[8];                 // 7 char ASCII ID; 0 terminates
    int32    diIRColor;                 // IR Color Code
    int16    iObjectRelPriority;        // Polygon relative priority
    uint8    swDrawFlag;                // How to draw the polygon
                                        // = 0 Draw solid backfaced
                                        // = 1 Draw solid no backface
                                        // = 2 Draw wireframe and not closed
                                        // = 3 Draw closed wireframe
                                        // = 4 Surround with wireframe in alternate color
                                        // = 8 Omni-directional light
                                        // = 9 Unidirectional light
                                        // = 10 Bidirectional light
    uint8    swTexWhite;                // if TRUE, draw textured polygon white (see note 1 below)
    uint16   wPrimaryNameIndex;         // Color name index
    uint16   wSecondaryNameIndex;       // Alternate color name index
    uint8    swNotUsed;                 // Not used
    uint8    swTemplateTrans;           // Set template transparency
                                        // = 0 None
                                        // = 1 Fixed
                                        // = 2 Axis type rotate
                                        // = 4 Point rotate
    int16    iDetailTexturePattern;     // Detail texture pattern no. -1 if none
    int16    iTexturePattern;           // Texture pattern no. -1 if none
    int16    iMaterial;                 // Material code [0-63]. -1 if none
    int16    iSurfaceMaterial;          // Surface material code (for DFAD)
    int16    iFeature;                  // Feature ID (for DFAD)
    int32    diIRMaterial;              // IR Material codes
    uint16   wTransparency;             // Transparency
                                        // = 0 opaque
                                        // = 65535 for totally clear
    // version 11, 12 & 13 ends here!

    uint8    swInfluenceLODGen;         // LOD Generation Control
    uint8    swLinestyle;               // Linestyle Index
    uint32   dwFlags;                   // Flags (bits from left to right)
                                        // 0 = Terrain
                                        // 1 = No Color
                                        // 2 = No Alt Color
                                        // 3 = Packed color
                                        // 4 = Terrain culture cutout (footprint)
                                        // 5 = Hidden (not drawn)
                                        // 6-31 Spare
    uint8    swLightMode;               // Lightmode
                                        // = 0 use face color, not illuminated
                                        // = 1 use vertex color, not illuminated
                                        // = 2 use face color and vertex normal
                                        // = 3 use vertex color and vertex normal

    uint8    Reserved1[7];              // Reserved
    color32  PrimaryPackedColor;        // Packed Color Primary (A, B, G, R)
    color32  SecondaryPackedColor;      // Packed Color Secondary (A, B, G, R)
    int16    iTextureMapIndex;          // Texture mapping index
    int16    iReserved2;
    uint32   dwPrimaryColorIndex;
    uint32   dwAlternateColorIndex;
    uint16   Reserved3[2];
};


class FaceRecord : public PrimNodeRecord
{
    public:

        enum DrawFlag {
            SOLID_BACKFACED = 0,
            SOLID_NO_BACKFACE = 1,
            WIREFRAME_NOT_CLOSED = 2,
            WIREFRAME_CLOSED = 3,
            SURROUND_ALTERNATE_COLOR = 4,
            OMNIDIRECTIONAL_LIGHT = 8,
            UNIDIRECTIONAL_LIGHT = 9,
            BIDIRECTIONAL_LIGHT = 10
        };

        enum LightMode {
            FACE_COLOR = 0,
            VERTEX_COLOR = 1,
            FACE_COLOR_LIGHTING = 2,
            VERTEX_COLOR_LIGHTING = 3
        };

        enum FlagBit {
            TERRAIN_BIT =       0x80000000,
            NO_COLOR_BIT =      0x40000000,
            NO_ALT_COLOR_BIT =  0x20000000,
            PACKED_COLOR_BIT =  0x10000000,
            FOOTPRINT_BIT =     0x08000000,
            HIDDEN_BIT =        0x04000000
        };

        FaceRecord();

        virtual Record* clone() const { return new FaceRecord(); }
        virtual const char* className() const { return "FaceRecord"; }
        virtual int classOpcode() const { return FACE_OP; }
        virtual size_t sizeofData() const { return sizeof(SFace); }
        virtual void accept(RecordVisitor& rv) { rv.apply(*this); }<commit_msg>Fixed WIREFRAME_CLOSED swap in flt loader. submitted by <NAME><commit_after>// FaceRecord.h

#ifndef __FLT_FACE_RECORD_H
#define __FLT_FACE_RECORD_H


#include "opcodes.h"
#include "Record.h"
#include "RecordVisitor.h"


namespace flt {



////////////////////////////////////////////////////////////////////
//
//                          FaceRecord
//
////////////////////////////////////////////////////////////////////


struct SFace
{
    SRecHeader    RecHeader;
    char    szIdent[8];                 // 7 char ASCII ID; 0 terminates
    int32    diIRColor;                 // IR Color Code
    int16    iObjectRelPriority;        // Polygon relative priority
    uint8    swDrawFlag;                // How to draw the polygon
                                        // = 0 Draw solid backfaced
                                        // = 1 Draw solid no backface
                                        // = 2 Draw closed wireframe (swapped in documentation)
                                        // = 3 Draw wireframe and not closed (swapped in documentation)
                                        // = 4 Surround with wireframe in alternate color
                                        // = 8 Omni-directional light
                                        // = 9 Unidirectional light
                                        // = 10 Bidirectional light
    uint8    swTexWhite;                // if TRUE, draw textured polygon white (see note 1 below)
    uint16   wPrimaryNameIndex;         // Color name index
    uint16   wSecondaryNameIndex;       // Alternate color name index
    uint8    swNotUsed;                 // Not used
    uint8    swTemplateTrans;           // Set template transparency
                                        // = 0 None
                                        // = 1 Fixed
                                        // = 2 Axis type rotate
                                        // = 4 Point rotate
    int16    iDetailTexturePattern;     // Detail texture pattern no. -1 if none
    int16    iTexturePattern;           // Texture pattern no. -1 if none
    int16    iMaterial;                 // Material code [0-63]. -1 if none
    int16    iSurfaceMaterial;          // Surface material code (for DFAD)
    int16    iFeature;                  // Feature ID (for DFAD)
    int32    diIRMaterial;              // IR Material codes
    uint16   wTransparency;             // Transparency
                                        // = 0 opaque
                                        // = 65535 for totally clear
    // version 11, 12 & 13 ends here!

    uint8    swInfluenceLODGen;         // LOD Generation Control
    uint8    swLinestyle;               // Linestyle Index
    uint32   dwFlags;                   // Flags (bits from left to right)
                                        // 0 = Terrain
                                        // 1 = No Color
                                        // 2 = No Alt Color
                                        // 3 = Packed color
                                        // 4 = Terrain culture cutout (footprint)
                                        // 5 = Hidden (not drawn)
                                        // 6-31 Spare
    uint8    swLightMode;               // Lightmode
                                        // = 0 use face color, not illuminated
                                        // = 1 use vertex color, not illuminated
                                        // = 2 use face color and vertex normal
                                        // = 3 use vertex color and vertex normal

    uint8    Reserved1[7];              // Reserved
    color32  PrimaryPackedColor;        // Packed Color Primary (A, B, G, R)
    color32  SecondaryPackedColor;      // Packed Color Secondary (A, B, G, R)
    int16    iTextureMapIndex;          // Texture mapping index
    int16    iReserved2;
    uint32   dwPrimaryColorIndex;
    uint32   dwAlternateColorIndex;
    uint16   Reserved3[2];
};


class FaceRecord : public PrimNodeRecord
{
    public:

        enum DrawFlag {
            SOLID_BACKFACED = 0,
            SOLID_NO_BACKFACE = 1,
            WIREFRAME_CLOSED = 2,
            WIREFRAME_NOT_CLOSED = 3,
            SURROUND_ALTERNATE_COLOR = 4,
            OMNIDIRECTIONAL_LIGHT = 8,
            UNIDIRECTIONAL_LIGHT = 9,
            BIDIRECTIONAL_LIGHT = 10
        };

        enum LightMode {
            FACE_COLOR = 0,
            VERTEX_COLOR = 1,
            FACE_COLOR_LIGHTING = 2,
            VERTEX_COLOR_LIGHTING = 3
        };

        enum FlagBit {
            TERRAIN_BIT =       0x80000000,
            NO_COLOR_BIT =      0x40000000,
            NO_ALT_COLOR_BIT =  0x20000000,
            PACKED_COLOR_BIT =  0x10000000,
            FOOTPRINT_BIT =     0x08000000,
            HIDDEN_BIT =        0x04000000
        };

        FaceRecord();

        virtual Record* clone() const { return new FaceRecord(); }
        virtual const char* className() const { return "FaceRecord"; }
        virtual int classOpcode() const { return FACE_OP; }
        virtual size_t sizeofData() const { return sizeof(SFace); }
        virtual void accept(RecordVisitor& rv) { rv.apply(*this); }
{'fraction_non_alphanumeric': 0.08793653864757667, 'fraction_numerical': 0.032117635677662765, 'mean_word_length': 0.9850230414746544, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 8, 'word_list_counts': {'cursed_substrings.json': 100, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2113252', 'n_tokens_mistral': 2649, 'n_tokens_neox': 2323, 'n_words': 738}