DXGL r858 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r857‎ | r858 | r859 >
Date:21:56, 7 September 2018
Author:admin
Status:new
Tags:
Comment:
Add comments to supported texture formats.
Modified paths:
  • /ddraw/glTexture.cpp (modified) (history)

Diff [purge]

Index: ddraw/glTexture.cpp
@@ -68,26 +68,26 @@
6969 static const int START_TEXFORMATS = __LINE__;
7070 const DDPIXELFORMAT texformats[] =
7171 { // Size Flags FOURCC bits R/Ymask G/U/Zmask B/V/STmask A/Zmask
72 - {sizeof(DDPIXELFORMAT), DDPF_PALETTEINDEXED8, 0, 8, 0, 0, 0, 0},
73 - {sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 8, 0xE0, 0x1C, 0x3, 0},
74 - {sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 16, 0x7C00, 0x3E0, 0x1F, 0},
75 - {sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 16, 0xF800, 0x7E0, 0x1F, 0},
76 - {sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 24, 0xFF0000, 0xFF00, 0xFF, 0},
77 - {sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 32, 0xFF0000, 0xFF00, 0xFF, 0},
78 - {sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 32, 0xFF, 0xFF00, 0xFF0000, 0},
79 - {sizeof(DDPIXELFORMAT), DDPF_RGB|DDPF_ALPHAPIXELS, 0, 16, 0xE0, 0x1C, 0x3, 0xFF00},
80 - {sizeof(DDPIXELFORMAT), DDPF_RGB|DDPF_ALPHAPIXELS, 0, 16, 0xF00, 0xF0, 0xF, 0xF000},
81 - {sizeof(DDPIXELFORMAT), DDPF_RGB|DDPF_ALPHAPIXELS, 0, 16, 0x7c00, 0x3E0, 0x1F, 0x8000},
82 - {sizeof(DDPIXELFORMAT), DDPF_RGB|DDPF_ALPHAPIXELS, 0, 32, 0xFF0000, 0xFF00, 0xFF, 0xFF000000},
83 - {sizeof(DDPIXELFORMAT), DDPF_LUMINANCE, 0, 8, 0xFF, 0, 0, 0},
84 - {sizeof(DDPIXELFORMAT), DDPF_ALPHA, 0, 8, 0, 0, 0, 0},
85 - {sizeof(DDPIXELFORMAT), DDPF_LUMINANCE|DDPF_ALPHAPIXELS,0, 16, 0xFF, 0, 0, 0xFF00},
86 - {sizeof(DDPIXELFORMAT), DDPF_ZBUFFER, 0, 16, 0, 0xFFFF, 0, 0},
87 - {sizeof(DDPIXELFORMAT), DDPF_ZBUFFER, 0, 24, 0, 0xFFFFFF00, 0, 0},
88 - {sizeof(DDPIXELFORMAT), DDPF_ZBUFFER, 0, 32, 0, 0xFFFFFF00, 0, 0},
89 - {sizeof(DDPIXELFORMAT), DDPF_ZBUFFER, 0, 32, 0, 0xFFFFFFFF, 0, 0},
90 - {sizeof(DDPIXELFORMAT), DDPF_ZBUFFER, 0, 32, 8, 0xFFFFFF00, 0xFF, 0},
91 - {sizeof(DDPIXELFORMAT), DDPF_ZBUFFER, 0, 32, 8, 0xFF, 0xFFFFFF00, 0}
 72+ {sizeof(DDPIXELFORMAT), DDPF_PALETTEINDEXED8, 0, 8, 0, 0, 0, 0}, // 8-bit paletted
 73+ {sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 8, 0xE0, 0x1C, 0x3, 0}, // 8 bit 332
 74+ {sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 16, 0x7C00, 0x3E0, 0x1F, 0}, // 15 bit 555
 75+ {sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 16, 0xF800, 0x7E0, 0x1F, 0}, // 16 bit 565
 76+ {sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 24, 0xFF0000, 0xFF00, 0xFF, 0}, // 24 bit 888
 77+ {sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 32, 0xFF0000, 0xFF00, 0xFF, 0}, // 32 bit 888
 78+ {sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 32, 0xFF, 0xFF00, 0xFF0000, 0}, // 32 bit 888 BGR
 79+ {sizeof(DDPIXELFORMAT), DDPF_RGB|DDPF_ALPHAPIXELS, 0, 16, 0xE0, 0x1C, 0x3, 0xFF00}, // 16-bit 8332
 80+ {sizeof(DDPIXELFORMAT), DDPF_RGB|DDPF_ALPHAPIXELS, 0, 16, 0xF00, 0xF0, 0xF, 0xF000}, // 16-bit 4444
 81+ {sizeof(DDPIXELFORMAT), DDPF_RGB|DDPF_ALPHAPIXELS, 0, 16, 0x7c00, 0x3E0, 0x1F, 0x8000}, // 16-bit 1555
 82+ {sizeof(DDPIXELFORMAT), DDPF_RGB|DDPF_ALPHAPIXELS, 0, 32, 0xFF0000, 0xFF00, 0xFF, 0xFF000000}, // 32-bit 8888
 83+ {sizeof(DDPIXELFORMAT), DDPF_LUMINANCE, 0, 8, 0xFF, 0, 0, 0}, // 8-bit luminance
 84+ {sizeof(DDPIXELFORMAT), DDPF_ALPHA, 0, 8, 0, 0, 0, 0}, // 8-bit alpha
 85+ {sizeof(DDPIXELFORMAT), DDPF_LUMINANCE|DDPF_ALPHAPIXELS,0, 16, 0xFF, 0, 0, 0xFF00}, // 8-bit luminance alpha
 86+ {sizeof(DDPIXELFORMAT), DDPF_ZBUFFER, 0, 16, 0, 0xFFFF, 0, 0}, // 16 bit Z buffer
 87+ {sizeof(DDPIXELFORMAT), DDPF_ZBUFFER, 0, 24, 0, 0xFFFFFF00, 0, 0}, // 24 bit Z buffer
 88+ {sizeof(DDPIXELFORMAT), DDPF_ZBUFFER, 0, 32, 0, 0xFFFFFF00, 0, 0}, // 24 bit Z buffer, 32-bit space
 89+ {sizeof(DDPIXELFORMAT), DDPF_ZBUFFER, 0, 32, 0, 0xFFFFFFFF, 0, 0}, // 32 bit Z buffer
 90+ {sizeof(DDPIXELFORMAT), DDPF_ZBUFFER, 0, 32, 8, 0xFFFFFF00, 0xFF, 0}, // 32 bit Z buffer with stencil
 91+ {sizeof(DDPIXELFORMAT), DDPF_ZBUFFER, 0, 32, 8, 0xFF, 0xFFFFFF00, 0} // 32 bit Z buffer with stencil, reversed
9292 };
9393 static const int END_TEXFORMATS = __LINE__ - 4;
9494 int numtexformats;