File: crn_dxt_hc_common.cpp

package info (click to toggle)
crunch-dxtc 0.55.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 3,624 kB
  • sloc: cpp: 64,979; ansic: 633; python: 321; makefile: 116
file content (41 lines) | stat: -rw-r--r-- 1,137 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// File: crn_dxt_hc_common.cpp
// See Copyright Notice and license at the end of inc/crnlib.h
#include "crn_core.h"
#include "crn_dxt_hc_common.h"

namespace crnlib {
chunk_encoding_desc g_chunk_encodings[cNumChunkEncodings] =
    {
        {1, {{0, 0, 8, 8, 0}}},

        {2, {{0, 0, 8, 4, 1}, {0, 4, 8, 4, 2}}},
        {2, {{0, 0, 4, 8, 3}, {4, 0, 4, 8, 4}}},

        {3, {{0, 0, 8, 4, 1}, {0, 4, 4, 4, 7}, {4, 4, 4, 4, 8}}},
        {3, {{0, 4, 8, 4, 2}, {0, 0, 4, 4, 5}, {4, 0, 4, 4, 6}}},

        {3, {{0, 0, 4, 8, 3}, {4, 0, 4, 4, 6}, {4, 4, 4, 4, 8}}},
        {3, {{4, 0, 4, 8, 4}, {0, 0, 4, 4, 5}, {0, 4, 4, 4, 7}}},

        {4, {{0, 0, 4, 4, 5}, {4, 0, 4, 4, 6}, {0, 4, 4, 4, 7}, {4, 4, 4, 4, 8}}}};

chunk_tile_desc g_chunk_tile_layouts[cNumChunkTileLayouts] =
    {
        // 2x2
        {0, 0, 8, 8, 0},

        // 2x1
        {0, 0, 8, 4, 1},
        {0, 4, 8, 4, 2},

        // 1x2
        {0, 0, 4, 8, 3},
        {4, 0, 4, 8, 4},

        // 1x1
        {0, 0, 4, 4, 5},
        {4, 0, 4, 4, 6},
        {0, 4, 4, 4, 7},
        {4, 4, 4, 4, 8}};

}  // namespace crnlib