-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgli_common.pas
125 lines (111 loc) · 5.79 KB
/
gli_common.pas
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
unit gli_common;
{$mode objfpc}{$H+}
interface
const
//increase after incompatible trace format changes
TRACE_VERSION = 13;
TRACE_ID = 'glide2x_trace';
type
//when adding traced functions add names in the same order as well (wrapped to 100 chars not including indentation)
TraceFunc = (
grAADrawLine, grAADrawPoint, grAADrawPolygon, grAADrawPolygonVertexList,
grAADrawTriangle, grAlphaBlendFunction, grAlphaCombine, grAlphaControlsITRGBLighting,
grAlphaTestFunction, grAlphaTestReferenceValue, grBufferClear, grBufferNumPending, grBufferSwap,
grCheckForRoom, grChromakeyMode, grChromakeyValue, grClipWindow, grColorCombine, grColorMask,
grConstantColorValue, grConstantColorValue4, grCullMode, grDepthBiasLevel, grDepthBufferFunction,
grDepthBufferMode, grDepthMask, grDisableAllEffects, grDitherMode, grDrawLine, grDrawPlanarPolygon,
grDrawPlanarPolygonVertexList, grDrawPoint, grDrawPolygon, grDrawPolygonVertexList, grDrawTriangle,
grErrorSetCallback, grFogColorValue, grFogMode, grFogTable, grGammaCorrectionValue, grGlideGetState,
grGlideGetVersion, grGlideInit, grGlideSetState, grGlideShamelessPlug, grGlideShutdown, grHints,
grLfbConstantAlpha, grLfbConstantDepth, grLfbLock, grLfbReadRegion, grLfbUnlock,
grLfbWriteColorFormat, grLfbWriteColorSwizzle, grLfbWriteRegion, grRenderBuffer, grResetTriStats,
grSplash, grSstControl, grSstIdle, grSstIsBusy, grSstOrigin, grSstPerfStats, grSstQueryBoards,
grSstQueryHardware, grSstResetPerfStats, grSstScreenHeight, grSstScreenWidth, grSstSelect,
grSstStatus, grSstVRetraceOn, grSstVideoLine, grSstWinClose, grSstWinOpen, grTexCalcMemRequired,
grTexClampMode, grTexCombine, grTexCombineFunction, grTexDetailControl, grTexDownloadMipMap,
grTexDownloadMipMapLevel, grTexDownloadMipMapLevelPartial, grTexDownloadTable,
grTexDownloadTablePartial, grTexFilterMode, grTexLodBiasValue, grTexMaxAddress, grTexMinAddress,
grTexMipMapMode, grTexMultibase, grTexMultibaseAddress, grTexNCCTable, grTexSource,
grTexTextureMemRequired, grTriStats,
gu3dfGetInfo,
gu3dfLoad,
guAADrawTriangleWithClip,
guAlphaSource,
guColorCombineFunction,
guDrawTriangleWithClip,
guFogGenerateExp,
guFogGenerateExp2,
guFogGenerateLinear,
guFogTableIndexToW,
guTexAllocateMemory,
guTexChangeAttributes,
guTexCombineFunction,
guTexDownloadMipMap,
guTexDownloadMipMapLevel,
guTexGetCurrentMipMap,
guTexGetMipMapInfo,
guTexMemQueryAvail,
guTexMemReset,
guTexSource,
guDrawPolygonVertexListWithClip,
guEncodeRLE16,
guEndianSwapBytes,
guEndianSwapWords,
guTexCreateColorMipMap,
ConvertAndDownloadRle
);
const
TraceFuncNames: array[TraceFunc] of PChar = (
'grAADrawLine', 'grAADrawPoint', 'grAADrawPolygon',
'grAADrawPolygonVertexList', 'grAADrawTriangle', 'grAlphaBlendFunction', 'grAlphaCombine',
'grAlphaControlsITRGBLighting', 'grAlphaTestFunction', 'grAlphaTestReferenceValue', 'grBufferClear',
'grBufferNumPending', 'grBufferSwap', 'grCheckForRoom', 'grChromakeyMode', 'grChromakeyValue',
'grClipWindow', 'grColorCombine', 'grColorMask', 'grConstantColorValue', 'grConstantColorValue4',
'grCullMode', 'grDepthBiasLevel', 'grDepthBufferFunction', 'grDepthBufferMode', 'grDepthMask',
'grDisableAllEffects', 'grDitherMode', 'grDrawLine', 'grDrawPlanarPolygon',
'grDrawPlanarPolygonVertexList', 'grDrawPoint', 'grDrawPolygon', 'grDrawPolygonVertexList',
'grDrawTriangle', 'grErrorSetCallback', 'grFogColorValue', 'grFogMode', 'grFogTable',
'grGammaCorrectionValue', 'grGlideGetState', 'grGlideGetVersion', 'grGlideInit', 'grGlideSetState',
'grGlideShamelessPlug', 'grGlideShutdown', 'grHints', 'grLfbConstantAlpha', 'grLfbConstantDepth',
'grLfbLock', 'grLfbReadRegion', 'grLfbUnlock', 'grLfbWriteColorFormat', 'grLfbWriteColorSwizzle',
'grLfbWriteRegion', 'grRenderBuffer', 'grResetTriStats', 'grSplash', 'grSstControl', 'grSstIdle',
'grSstIsBusy', 'grSstOrigin', 'grSstPerfStats', 'grSstQueryBoards', 'grSstQueryHardware',
'grSstResetPerfStats', 'grSstScreenHeight', 'grSstScreenWidth', 'grSstSelect', 'grSstStatus',
'grSstVRetraceOn', 'grSstVideoLine', 'grSstWinClose', 'grSstWinOpen', 'grTexCalcMemRequired',
'grTexClampMode', 'grTexCombine', 'grTexCombineFunction', 'grTexDetailControl',
'grTexDownloadMipMap', 'grTexDownloadMipMapLevel', 'grTexDownloadMipMapLevelPartial',
'grTexDownloadTable', 'grTexDownloadTablePartial', 'grTexFilterMode', 'grTexLodBiasValue',
'grTexMaxAddress', 'grTexMinAddress', 'grTexMipMapMode', 'grTexMultibase', 'grTexMultibaseAddress',
'grTexNCCTable', 'grTexSource', 'grTexTextureMemRequired', 'grTriStats',
'gu3dfGetInfo',
'gu3dfLoad',
'guAADrawTriangleWithClip',
'guAlphaSource',
'guColorCombineFunction',
'guDrawTriangleWithClip',
'guFogGenerateExp',
'guFogGenerateExp2',
'guFogGenerateLinear',
'guFogTableIndexToW',
'guTexAllocateMemory',
'guTexChangeAttributes',
'guTexCombineFunction',
'guTexDownloadMipMap',
'guTexDownloadMipMapLevel',
'guTexGetCurrentMipMap',
'guTexGetMipMapInfo',
'guTexMemQueryAvail',
'guTexMemReset',
'guTexSource',
'guDrawPolygonVertexListWithClip',
'guEncodeRLE16',
'guEndianSwapBytes',
'guEndianSwapWords',
'guTexCreateColorMipMap',
'ConvertAndDownloadRle');
DrawCalls = [
grAADrawLine, grAADrawPoint, grAADrawPolygon, grAADrawPolygonVertexList, grAADrawTriangle,
grDrawLine, grDrawPlanarPolygon, grDrawPlanarPolygonVertexList, grDrawPoint,
grDrawPolygon, grDrawPolygonVertexList, grDrawTriangle, guDrawTriangleWithClip];
implementation
end.